{(function(i,e){typeof Lg=="object"?XA.exports=Lg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Lg,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var m=0;m<64;m++)a[m]=e.abs(e.sin(m+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,p){for(var f=0;f<16;f++){var _=p+f,b=m[_];m[_]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var C=this._hash.words,T=m[p+0],w=m[p+1],A=m[p+2],O=m[p+3],R=m[p+4],j=m[p+5],q=m[p+6],_e=m[p+7],J=m[p+8],ke=m[p+9],Oe=m[p+10],Pe=m[p+11],et=m[p+12],B=m[p+13],Z=m[p+14],ee=m[p+15],V=C[0],H=C[1],U=C[2],X=C[3];V=c(V,H,U,X,T,7,a[0]),X=c(X,V,H,U,w,12,a[1]),U=c(U,X,V,H,A,17,a[2]),H=c(H,U,X,V,O,22,a[3]),V=c(V,H,U,X,R,7,a[4]),X=c(X,V,H,U,j,12,a[5]),U=c(U,X,V,H,q,17,a[6]),H=c(H,U,X,V,_e,22,a[7]),V=c(V,H,U,X,J,7,a[8]),X=c(X,V,H,U,ke,12,a[9]),U=c(U,X,V,H,Oe,17,a[10]),H=c(H,U,X,V,Pe,22,a[11]),V=c(V,H,U,X,et,7,a[12]),X=c(X,V,H,U,B,12,a[13]),U=c(U,X,V,H,Z,17,a[14]),H=c(H,U,X,V,ee,22,a[15]),V=d(V,H,U,X,w,5,a[16]),X=d(X,V,H,U,q,9,a[17]),U=d(U,X,V,H,Pe,14,a[18]),H=d(H,U,X,V,T,20,a[19]),V=d(V,H,U,X,j,5,a[20]),X=d(X,V,H,U,Oe,9,a[21]),U=d(U,X,V,H,ee,14,a[22]),H=d(H,U,X,V,R,20,a[23]),V=d(V,H,U,X,ke,5,a[24]),X=d(X,V,H,U,Z,9,a[25]),U=d(U,X,V,H,O,14,a[26]),H=d(H,U,X,V,J,20,a[27]),V=d(V,H,U,X,B,5,a[28]),X=d(X,V,H,U,A,9,a[29]),U=d(U,X,V,H,_e,14,a[30]),H=d(H,U,X,V,et,20,a[31]),V=h(V,H,U,X,j,4,a[32]),X=h(X,V,H,U,J,11,a[33]),U=h(U,X,V,H,Pe,16,a[34]),H=h(H,U,X,V,Z,23,a[35]),V=h(V,H,U,X,w,4,a[36]),X=h(X,V,H,U,R,11,a[37]),U=h(U,X,V,H,_e,16,a[38]),H=h(H,U,X,V,Oe,23,a[39]),V=h(V,H,U,X,B,4,a[40]),X=h(X,V,H,U,T,11,a[41]),U=h(U,X,V,H,O,16,a[42]),H=h(H,U,X,V,q,23,a[43]),V=h(V,H,U,X,ke,4,a[44]),X=h(X,V,H,U,et,11,a[45]),U=h(U,X,V,H,ee,16,a[46]),H=h(H,U,X,V,A,23,a[47]),V=u(V,H,U,X,T,6,a[48]),X=u(X,V,H,U,_e,10,a[49]),U=u(U,X,V,H,Z,15,a[50]),H=u(H,U,X,V,j,21,a[51]),V=u(V,H,U,X,et,6,a[52]),X=u(X,V,H,U,O,10,a[53]),U=u(U,X,V,H,Oe,15,a[54]),H=u(H,U,X,V,w,21,a[55]),V=u(V,H,U,X,J,6,a[56]),X=u(X,V,H,U,ee,10,a[57]),U=u(U,X,V,H,q,15,a[58]),H=u(H,U,X,V,B,21,a[59]),V=u(V,H,U,X,R,6,a[60]),X=u(X,V,H,U,Pe,10,a[61]),U=u(U,X,V,H,A,15,a[62]),H=u(H,U,X,V,ke,21,a[63]),C[0]=C[0]+V|0,C[1]=C[1]+H|0,C[2]=C[2]+U|0,C[3]=C[3]+X|0},_doFinalize:function(){var m=this._data,p=m.words,f=this._nDataBytes*8,_=m.sigBytes*8;p[_>>>5]|=128<<24-_%32;var b=e.floor(f/4294967296),C=f;p[(_+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p[(_+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,m.sigBytes=(p.length+1)*4,this._process();for(var T=this._hash,w=T.words,A=0;A<4;A++){var O=w[A];w[A]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return T},clone:function(){var m=o.clone.call(this);return m._hash=this._hash.clone(),m}});function c(m,p,f,_,b,C,T){var w=m+(p&f|~p&_)+b+T;return(w<>>32-C)+p}function d(m,p,f,_,b,C,T){var w=m+(p&_|f&~_)+b+T;return(w< >>32-C)+p}function h(m,p,f,_,b,C,T){var w=m+(p^f^_)+b+T;return(w< >>32-C)+p}function u(m,p,f,_,b,C,T){var w=m+(f^(p|~_))+b+T;return(w< >>32-C)+p}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var ZA=lt((Ng,JA)=>{(function(i,e){typeof Ng=="object"?JA.exports=Ng=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Ng,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function h(f){for(var _=e.sqrt(f),b=2;b<=_;b++)if(!(f%b))return!1;return!0}function u(f){return(f-(f|0))*4294967296|0}for(var m=2,p=0;p<64;)h(m)&&(p<8&&(a[p]=u(e.pow(m,1/2))),l[p]=u(e.pow(m,1/3)),p++),m++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(h,u){for(var m=this._hash.words,p=m[0],f=m[1],_=m[2],b=m[3],C=m[4],T=m[5],w=m[6],A=m[7],O=0;O<64;O++){if(O<16)c[O]=h[u+O]|0;else{var R=c[O-15],j=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,q=c[O-2],_e=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;c[O]=j+c[O-7]+_e+c[O-16]}var J=C&T^~C&w,ke=p&f^p&_^f&_,Oe=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),Pe=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),et=A+Pe+J+l[O]+c[O],B=Oe+ke;A=w,w=T,T=C,C=b+et|0,b=_,_=f,f=p,p=et+B|0}m[0]=m[0]+p|0,m[1]=m[1]+f|0,m[2]=m[2]+_|0,m[3]=m[3]+b|0,m[4]=m[4]+C|0,m[5]=m[5]+T|0,m[6]=m[6]+w|0,m[7]=m[7]+A|0},_doFinalize:function(){var h=this._data,u=h.words,m=this._nDataBytes*8,p=h.sigBytes*8;return u[p>>>5]|=128<<24-p%32,u[(p+64>>>9<<4)+14]=e.floor(m/4294967296),u[(p+64>>>9<<4)+15]=m,h.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var h=o.clone.call(this);return h._hash=this._hash.clone(),h}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var tL=lt((Dg,eL)=>{(function(i,e){typeof Dg=="object"?eL.exports=Dg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Dg,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var h=[],u=0;u >>2]>>>24-u%4*8&255,p=l[u+1>>>2]>>>24-(u+1)%4*8&255,f=l[u+2>>>2]>>>24-(u+2)%4*8&255,_=m<<16|p<<8|f,b=0;b<4&&u+b*.75 >>6*(3-b)&63));var C=d.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h >>6-u%4*2,f=m|p;d[h>>>2]|=f<<24-h%4*8,h++}return n.create(d,h)}}(),i.enc.Base64})});var Q9=lt(($ae,wL)=>{wL.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var DL=lt((Yae,NL)=>{"use strict";var zg=Object.prototype.hasOwnProperty,LL=Object.prototype.toString,xL=Object.defineProperty,EL=Object.getOwnPropertyDescriptor,TL=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LL.call(e)==="[object Array]"},IL=function(e){if(!e||LL.call(e)!=="[object Object]")return!1;var t=zg.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&zg.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||zg.call(e,r)},kL=function(e,t){xL&&t.name==="__proto__"?xL(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},AL=function(e,t){if(t==="__proto__")if(zg.call(e,t)){if(EL)return EL(e,t).value}else return;return e[t]};NL.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l {"use strict";var XN={};function eq(i){var e,t,n=XN[i];if(n)return n;for(n=XN[i]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e =55296&&o<=57343){if(o>=55296&&o<=56319&&n+1 =56320&&s<=57343)){l+=encodeURIComponent(i[n]+i[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(i[n])}return l}Jg.defaultChars=";/?:@&=+$,-_.!~*'()#";Jg.componentChars="-_.!~*'()";QN.exports=Jg});var i_=lt(na=>{"use strict";var aq=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];na.REPLACEMENT_CHARACTER="\uFFFD";na.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};na.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};na.isSurrogate=function(i){return i>=55296&&i<=57343};na.isSurrogatePair=function(i){return i>=56320&&i<=57343};na.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};na.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};na.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||aq.indexOf(i)>-1}});var n_=lt((l1e,gD)=>{"use strict";gD.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var vD=lt((c1e,_D)=>{"use strict";var wh=i_(),Dy=n_(),Sc=wh.CODE_POINTS,lq=65536,Ry=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=lq}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){let t=this.html.charCodeAt(this.pos+1);if(wh.isSurrogatePair(t))return this.pos++,this._addGap(),wh.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Sc.EOF;return this._err(Dy.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Sc.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===Sc.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===Sc.CARRIAGE_RETURN?(this.skipNextNewLine=!0,Sc.LINE_FEED):(this.skipNextNewLine=!1,wh.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===Sc.LINE_FEED||e===Sc.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){wh.isControlCodePoint(e)?this._err(Dy.controlCharacterInInputStream):wh.isUndefinedCodePoint(e)&&this._err(Dy.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};_D.exports=Ry});var yD=lt((d1e,bD)=>{"use strict";bD.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var Q1=lt((h1e,vR)=>{"use strict";var cq=vD(),zt=i_(),xc=yD(),Q=n_(),D=zt.CODE_POINTS,Cc=zt.CODE_POINT_SEQUENCES,dq={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},uR=1,mR=2,pR=4,hq=uR|mR|pR,pt="DATA_STATE",Eh="RCDATA_STATE",Y1="RAWTEXT_STATE",sa="SCRIPT_DATA_STATE",fR="PLAINTEXT_STATE",SD="TAG_OPEN_STATE",CD="END_TAG_OPEN_STATE",My="TAG_NAME_STATE",wD="RCDATA_LESS_THAN_SIGN_STATE",xD="RCDATA_END_TAG_OPEN_STATE",ED="RCDATA_END_TAG_NAME_STATE",TD="RAWTEXT_LESS_THAN_SIGN_STATE",ID="RAWTEXT_END_TAG_OPEN_STATE",kD="RAWTEXT_END_TAG_NAME_STATE",AD="SCRIPT_DATA_LESS_THAN_SIGN_STATE",LD="SCRIPT_DATA_END_TAG_OPEN_STATE",ND="SCRIPT_DATA_END_TAG_NAME_STATE",DD="SCRIPT_DATA_ESCAPE_START_STATE",RD="SCRIPT_DATA_ESCAPE_START_DASH_STATE",yo="SCRIPT_DATA_ESCAPED_STATE",MD="SCRIPT_DATA_ESCAPED_DASH_STATE",Oy="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",r_="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",OD="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",PD="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",FD="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",ra="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",HD="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",BD="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",o_="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",zD="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",ss="BEFORE_ATTRIBUTE_NAME_STATE",s_="ATTRIBUTE_NAME_STATE",Py="AFTER_ATTRIBUTE_NAME_STATE",Fy="BEFORE_ATTRIBUTE_VALUE_STATE",a_="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",l_="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",c_="ATTRIBUTE_VALUE_UNQUOTED_STATE",Hy="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",ul="SELF_CLOSING_START_TAG_STATE",K1="BOGUS_COMMENT_STATE",UD="MARKUP_DECLARATION_OPEN_STATE",WD="COMMENT_START_STATE",jD="COMMENT_START_DASH_STATE",ml="COMMENT_STATE",VD="COMMENT_LESS_THAN_SIGN_STATE",KD="COMMENT_LESS_THAN_SIGN_BANG_STATE",qD="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",GD="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",d_="COMMENT_END_DASH_STATE",h_="COMMENT_END_STATE",$D="COMMENT_END_BANG_STATE",YD="DOCTYPE_STATE",u_="BEFORE_DOCTYPE_NAME_STATE",m_="DOCTYPE_NAME_STATE",XD="AFTER_DOCTYPE_NAME_STATE",QD="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",JD="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",By="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",zy="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Uy="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ZD="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",eR="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",tR="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",q1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",G1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Wy="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",oa="BOGUS_DOCTYPE_STATE",p_="CDATA_SECTION_STATE",iR="CDATA_SECTION_BRACKET_STATE",nR="CDATA_SECTION_END_STATE",xh="CHARACTER_REFERENCE_STATE",rR="NAMED_CHARACTER_REFERENCE_STATE",oR="AMBIGUOS_AMPERSAND_STATE",sR="NUMERIC_CHARACTER_REFERENCE_STATE",aR="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",lR="DECIMAL_CHARACTER_REFERENCE_START_STATE",cR="HEXADEMICAL_CHARACTER_REFERENCE_STATE",dR="DECIMAL_CHARACTER_REFERENCE_STATE",$1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function si(i){return i===D.SPACE||i===D.LINE_FEED||i===D.TABULATION||i===D.FORM_FEED}function X1(i){return i>=D.DIGIT_0&&i<=D.DIGIT_9}function So(i){return i>=D.LATIN_CAPITAL_A&&i<=D.LATIN_CAPITAL_Z}function wc(i){return i>=D.LATIN_SMALL_A&&i<=D.LATIN_SMALL_Z}function fl(i){return wc(i)||So(i)}function jy(i){return fl(i)||X1(i)}function gR(i){return i>=D.LATIN_CAPITAL_A&&i<=D.LATIN_CAPITAL_F}function _R(i){return i>=D.LATIN_SMALL_A&&i<=D.LATIN_SMALL_F}function uq(i){return X1(i)||gR(i)||_R(i)}function f_(i){return i+32}function wi(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function pl(i){return String.fromCharCode(f_(i))}function hR(i,e){let t=xc[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=xc[o];if(s e)r=o-1;else return xc[o+t]}return-1}var lr=class i{constructor(){this.preprocessor=new cq,this.tokenQueue=[],this.allowCDATA=!1,this.state=pt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:i.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0,s=e.length,a=0,l=t,c;for(;a 0&&(l=this._consume(),r++),l===D.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==f_(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==Cc.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(Q.endTagWithAttributes),e.selfClosing&&this._err(Q.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=i.CHARACTER_TOKEN;si(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===D.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,wi(e))}_emitSeveralCodePoints(e){for(let t=0;t -1;){let o=xc[r],s=o ")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=yo,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=yo,this._emitCodePoint(e))}[r_](e){e===D.SOLIDUS?(this.tempBuff=[],this.state=OD):fl(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(FD)):(this._emitChars("<"),this._reconsumeInState(yo))}[OD](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(PD)):(this._emitChars(""),this._reconsumeInState(yo))}[PD](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=wi(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(si(e)){this.state=ss;return}if(e===D.SOLIDUS){this.state=ul;return}if(e===D.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=pt;return}}this._emitChars(""),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(yo)}}[FD](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?ra:yo,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(yo)}[ra](e){e===D.HYPHEN_MINUS?(this.state=HD,this._emitChars("-")):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[HD](e){e===D.HYPHEN_MINUS?(this.state=BD,this._emitChars("-")):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[BD](e){e===D.HYPHEN_MINUS?this._emitChars("-"):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.GREATER_THAN_SIGN?(this.state=sa,this._emitChars(">")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[o_](e){e===D.SOLIDUS?(this.tempBuff=[],this.state=zD,this._emitChars("/")):this._reconsumeInState(ra)}[zD](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?yo:ra,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(ra)}[ss](e){si(e)||(e===D.SOLIDUS||e===D.GREATER_THAN_SIGN||e===D.EOF?this._reconsumeInState(Py):e===D.EQUALS_SIGN?(this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=s_):(this._createAttr(""),this._reconsumeInState(s_)))}[s_](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN||e===D.EOF?(this._leaveAttrName(Py),this._unconsume()):e===D.EQUALS_SIGN?this._leaveAttrName(Fy):So(e)?this.currentAttr.name+=pl(e):e===D.QUOTATION_MARK||e===D.APOSTROPHE||e===D.LESS_THAN_SIGN?(this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=wi(e)):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=zt.REPLACEMENT_CHARACTER):this.currentAttr.name+=wi(e)}[Py](e){si(e)||(e===D.SOLIDUS?this.state=ul:e===D.EQUALS_SIGN?this.state=Fy:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(s_)))}[Fy](e){si(e)||(e===D.QUOTATION_MARK?this.state=a_:e===D.APOSTROPHE?this.state=l_:e===D.GREATER_THAN_SIGN?(this._err(Q.missingAttributeValue),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(c_))}[a_](e){e===D.QUOTATION_MARK?this.state=Hy:e===D.AMPERSAND?(this.returnState=a_,this.state=xh):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[l_](e){e===D.APOSTROPHE?this.state=Hy:e===D.AMPERSAND?(this.returnState=l_,this.state=xh):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[c_](e){si(e)?this._leaveAttrValue(ss):e===D.AMPERSAND?(this.returnState=c_,this.state=xh):e===D.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.QUOTATION_MARK||e===D.APOSTROPHE||e===D.LESS_THAN_SIGN||e===D.EQUALS_SIGN||e===D.GRAVE_ACCENT?(this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=wi(e)):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[Hy](e){si(e)?this._leaveAttrValue(ss):e===D.SOLIDUS?this._leaveAttrValue(ul):e===D.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.missingWhitespaceBetweenAttributes),this._reconsumeInState(ss))}[ul](e){e===D.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.unexpectedSolidusInTag),this._reconsumeInState(ss))}[K1](e){e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):this.currentToken.data+=wi(e)}[UD](e){this._consumeSequenceIfMatch(Cc.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=WD):this._consumeSequenceIfMatch(Cc.DOCTYPE_STRING,e,!1)?this.state=YD:this._consumeSequenceIfMatch(Cc.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=p_:(this._err(Q.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=K1):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(K1))}[WD](e){e===D.HYPHEN_MINUS?this.state=jD:e===D.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(ml)}[jD](e){e===D.HYPHEN_MINUS?this.state=h_:e===D.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[ml](e){e===D.HYPHEN_MINUS?this.state=d_:e===D.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=VD):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=wi(e)}[VD](e){e===D.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=KD):e===D.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ml)}[KD](e){e===D.HYPHEN_MINUS?this.state=qD:this._reconsumeInState(ml)}[qD](e){e===D.HYPHEN_MINUS?this.state=GD:this._reconsumeInState(d_)}[GD](e){e!==D.GREATER_THAN_SIGN&&e!==D.EOF&&this._err(Q.nestedComment),this._reconsumeInState(h_)}[d_](e){e===D.HYPHEN_MINUS?this.state=h_:e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[h_](e){e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EXCLAMATION_MARK?this.state=$D:e===D.HYPHEN_MINUS?this.currentToken.data+="-":e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ml))}[$D](e){e===D.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=d_):e===D.GREATER_THAN_SIGN?(this._err(Q.incorrectlyClosedComment),this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ml))}[YD](e){si(e)?this.state=u_:e===D.GREATER_THAN_SIGN?this._reconsumeInState(u_):e===D.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(u_))}[u_](e){si(e)||(So(e)?(this._createDoctypeToken(pl(e)),this.state=m_):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(zt.REPLACEMENT_CHARACTER),this.state=m_):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(wi(e)),this.state=m_))}[m_](e){si(e)?this.state=XD:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):So(e)?this.currentToken.name+=pl(e):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.name+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=wi(e)}[XD](e){si(e)||(e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(Cc.PUBLIC_STRING,e,!1)?this.state=QD:this._consumeSequenceIfMatch(Cc.SYSTEM_STRING,e,!1)?this.state=eR:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[QD](e){si(e)?this.state=JD:e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=By):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=zy):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[JD](e){si(e)||(e===D.QUOTATION_MARK?(this.currentToken.publicId="",this.state=By):e===D.APOSTROPHE?(this.currentToken.publicId="",this.state=zy):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[By](e){e===D.QUOTATION_MARK?this.state=Uy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=wi(e)}[zy](e){e===D.APOSTROPHE?this.state=Uy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=wi(e)}[Uy](e){si(e)?this.state=ZD:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=G1):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[ZD](e){si(e)||(e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[eR](e){si(e)?this.state=tR:e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=G1):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[tR](e){si(e)||(e===D.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[q1](e){e===D.QUOTATION_MARK?this.state=Wy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=wi(e)}[G1](e){e===D.APOSTROPHE?this.state=Wy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=wi(e)}[Wy](e){si(e)||(e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(oa)))}[oa](e){e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.NULL?this._err(Q.unexpectedNullCharacter):e===D.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[p_](e){e===D.RIGHT_SQUARE_BRACKET?this.state=iR:e===D.EOF?(this._err(Q.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[iR](e){e===D.RIGHT_SQUARE_BRACKET?this.state=nR:(this._emitChars("]"),this._reconsumeInState(p_))}[nR](e){e===D.GREATER_THAN_SIGN?this.state=pt:e===D.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(p_))}[xh](e){this.tempBuff=[D.AMPERSAND],e===D.NUMBER_SIGN?(this.tempBuff.push(e),this.state=sR):jy(e)?this._reconsumeInState(rR):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[rR](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[D.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===D.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(Q.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=oR}[oR](e){jy(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=wi(e):this._emitCodePoint(e):(e===D.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[sR](e){this.charRefCode=0,e===D.LATIN_SMALL_X||e===D.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=aR):this._reconsumeInState(lR)}[aR](e){uq(e)?this._reconsumeInState(cR):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[lR](e){X1(e)?this._reconsumeInState(dR):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[cR](e){gR(e)?this.charRefCode=this.charRefCode*16+e-55:_R(e)?this.charRefCode=this.charRefCode*16+e-87:X1(e)?this.charRefCode=this.charRefCode*16+e-48:e===D.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[dR](e){X1(e)?this.charRefCode=this.charRefCode*10+e-48:e===D.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[$1](){if(this.charRefCode===D.NULL)this._err(Q.nullCharacterReference),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Q.characterReferenceOutsideUnicodeRange),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(zt.isSurrogate(this.charRefCode))this._err(Q.surrogateCharacterReference),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(zt.isUndefinedCodePoint(this.charRefCode))this._err(Q.noncharacterCharacterReference);else if(zt.isControlCodePoint(this.charRefCode)||this.charRefCode===D.CARRIAGE_RETURN){this._err(Q.controlCharacterReference);let e=dq[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};lr.CHARACTER_TOKEN="CHARACTER_TOKEN";lr.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";lr.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";lr.START_TAG_TOKEN="START_TAG_TOKEN";lr.END_TAG_TOKEN="END_TAG_TOKEN";lr.COMMENT_TOKEN="COMMENT_TOKEN";lr.DOCTYPE_TOKEN="DOCTYPE_TOKEN";lr.EOF_TOKEN="EOF_TOKEN";lr.HIBERNATION_TOKEN="HIBERNATION_TOKEN";lr.MODE={DATA:pt,RCDATA:Eh,RAWTEXT:Y1,SCRIPT_DATA:sa,PLAINTEXT:fR};lr.getTokenAttr=function(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null};vR.exports=lr});var Ec=lt(Th=>{"use strict";var Vy=Th.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Th.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Th.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var ue=Th.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Th.SPECIAL_ELEMENTS={[Vy.HTML]:{[ue.ADDRESS]:!0,[ue.APPLET]:!0,[ue.AREA]:!0,[ue.ARTICLE]:!0,[ue.ASIDE]:!0,[ue.BASE]:!0,[ue.BASEFONT]:!0,[ue.BGSOUND]:!0,[ue.BLOCKQUOTE]:!0,[ue.BODY]:!0,[ue.BR]:!0,[ue.BUTTON]:!0,[ue.CAPTION]:!0,[ue.CENTER]:!0,[ue.COL]:!0,[ue.COLGROUP]:!0,[ue.DD]:!0,[ue.DETAILS]:!0,[ue.DIR]:!0,[ue.DIV]:!0,[ue.DL]:!0,[ue.DT]:!0,[ue.EMBED]:!0,[ue.FIELDSET]:!0,[ue.FIGCAPTION]:!0,[ue.FIGURE]:!0,[ue.FOOTER]:!0,[ue.FORM]:!0,[ue.FRAME]:!0,[ue.FRAMESET]:!0,[ue.H1]:!0,[ue.H2]:!0,[ue.H3]:!0,[ue.H4]:!0,[ue.H5]:!0,[ue.H6]:!0,[ue.HEAD]:!0,[ue.HEADER]:!0,[ue.HGROUP]:!0,[ue.HR]:!0,[ue.HTML]:!0,[ue.IFRAME]:!0,[ue.IMG]:!0,[ue.INPUT]:!0,[ue.LI]:!0,[ue.LINK]:!0,[ue.LISTING]:!0,[ue.MAIN]:!0,[ue.MARQUEE]:!0,[ue.MENU]:!0,[ue.META]:!0,[ue.NAV]:!0,[ue.NOEMBED]:!0,[ue.NOFRAMES]:!0,[ue.NOSCRIPT]:!0,[ue.OBJECT]:!0,[ue.OL]:!0,[ue.P]:!0,[ue.PARAM]:!0,[ue.PLAINTEXT]:!0,[ue.PRE]:!0,[ue.SCRIPT]:!0,[ue.SECTION]:!0,[ue.SELECT]:!0,[ue.SOURCE]:!0,[ue.STYLE]:!0,[ue.SUMMARY]:!0,[ue.TABLE]:!0,[ue.TBODY]:!0,[ue.TD]:!0,[ue.TEMPLATE]:!0,[ue.TEXTAREA]:!0,[ue.TFOOT]:!0,[ue.TH]:!0,[ue.THEAD]:!0,[ue.TITLE]:!0,[ue.TR]:!0,[ue.TRACK]:!0,[ue.UL]:!0,[ue.WBR]:!0,[ue.XMP]:!0},[Vy.MATHML]:{[ue.MI]:!0,[ue.MO]:!0,[ue.MN]:!0,[ue.MS]:!0,[ue.MTEXT]:!0,[ue.ANNOTATION_XML]:!0},[Vy.SVG]:{[ue.TITLE]:!0,[ue.FOREIGN_OBJECT]:!0,[ue.DESC]:!0}}});var CR=lt((m1e,SR)=>{"use strict";var yR=Ec(),fe=yR.TAG_NAMES,Ut=yR.NAMESPACES;function bR(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI;case 3:return i===fe.RTC;case 6:return i===fe.OPTION;case 8:return i===fe.OPTGROUP}return!1}function mq(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI||i===fe.TD||i===fe.TH||i===fe.TR;case 3:return i===fe.RTC;case 5:return i===fe.TBODY||i===fe.TFOOT||i===fe.THEAD;case 6:return i===fe.OPTION;case 7:return i===fe.CAPTION;case 8:return i===fe.OPTGROUP||i===fe.COLGROUP}return!1}function g_(i,e){switch(i.length){case 2:if(i===fe.TD||i===fe.TH)return e===Ut.HTML;if(i===fe.MI||i===fe.MO||i===fe.MN||i===fe.MS)return e===Ut.MATHML;break;case 4:if(i===fe.HTML)return e===Ut.HTML;if(i===fe.DESC)return e===Ut.SVG;break;case 5:if(i===fe.TABLE)return e===Ut.HTML;if(i===fe.MTEXT)return e===Ut.MATHML;if(i===fe.TITLE)return e===Ut.SVG;break;case 6:return(i===fe.APPLET||i===fe.OBJECT)&&e===Ut.HTML;case 7:return(i===fe.CAPTION||i===fe.MARQUEE)&&e===Ut.HTML;case 8:return i===fe.TEMPLATE&&e===Ut.HTML;case 13:return i===fe.FOREIGN_OBJECT&&e===Ut.SVG;case 14:return i===fe.ANNOTATION_XML&&e===Ut.MATHML}return!1}var Ky=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===fe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ut.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){let n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===Ut.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){let t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.H1||e===fe.H2||e===fe.H3||e===fe.H4||e===fe.H5||e===fe.H6&&t===Ut.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.TD||e===fe.TH&&t===Ut.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==fe.TABLE&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==fe.TBODY&&this.currentTagName!==fe.TFOOT&&this.currentTagName!==fe.THEAD&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==fe.TR&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let e=this.items[1];return e&&this.treeAdapter.getTagName(e)===fe.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===fe.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(g_(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===fe.H1||t===fe.H2||t===fe.H3||t===fe.H4||t===fe.H5||t===fe.H6)&&n===Ut.HTML)return!0;if(g_(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if((n===fe.UL||n===fe.OL)&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(n===fe.BUTTON&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n===fe.TABLE||n===fe.TEMPLATE||n===fe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===Ut.HTML){if(t===fe.TBODY||t===fe.THEAD||t===fe.TFOOT)return!0;if(t===fe.TABLE||t===fe.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n!==fe.OPTION&&n!==fe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;bR(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;mq(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;bR(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};SR.exports=Ky});var xR=lt((p1e,wR)=>{"use strict";var J1=class i{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){let t=[];if(this.length>=3){let n=this.treeAdapter.getAttrList(e).length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let s=this.length-1;s>=0;s--){let a=this.entries[s];if(a.type===i.MARKER_ENTRY)break;let l=a.element,c=this.treeAdapter.getAttrList(l);this.treeAdapter.getTagName(l)===r&&this.treeAdapter.getNamespaceURI(l)===o&&c.length===n&&t.push({idx:s,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){let t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){let r=this.treeAdapter.getAttrList(e),o=r.length,s=Object.create(null);for(let a=0;a =3-1;a--)this.entries.splice(t[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:i.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let e=this.entries.pop();if(this.length--,e.type===i.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.ELEMENT_ENTRY&&n.element===e)return n}return null}};J1.MARKER_ENTRY="MARKER_ENTRY";J1.ELEMENT_ENTRY="ELEMENT_ENTRY";wR.exports=J1});var as=lt((f1e,ER)=>{"use strict";var __=class{constructor(e){let t={},n=this._getOverriddenMethods(this,t);for(let r of Object.keys(n))typeof n[r]=="function"&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}};__.install=function(i,e,t){i.__mixins||(i.__mixins=[]);for(let r=0;r {"use strict";var pq=as(),qy=class extends pq{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){let n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),(r===` +import{a as YE,b as Jp,c as XE,d as E2,e as QE,f as Fd,g as T2,h as Ur,i as Si,j as qa,k as qu,l as Gu,m as Qn,n as I2,o as JE,p as ZE,q as Ql,r as eT,s as tT}from"./chunk-CIZ5P7CP.js";import{$ as ii,$a as St,$b as ae,$c as Xt,$d as Gd,$e as qo,$f as eh,$g as Qo,$h as Ar,$i as S9,A as oT,Aa as CT,Ab as Wd,Ac as Mi,Ad as xf,Ae as hc,Af as jI,Ag as sj,Ah as Tk,Ai as m9,B as Ga,Ba as xn,Bb as P2,Bc as jT,Bd as Ef,Be as rl,Bf as VI,Bg as uk,Bh as Ik,Bi as ig,C as rf,Ca as Bo,Cb as NT,Cc as VW,Cd as I,Ce as bI,Cf as KI,Cg as aj,Ch as kk,Ci as ng,D as A2,Da as wT,Db as F2,Dc as j2,Dd as ht,De as xt,Df as qI,Dg as Z2,Dh as Oi,Di as Kk,E as sT,Ea as xT,Eb as H2,Ec as KW,Ed as Kd,Ee as Xd,Ef as GI,Eg as nh,Eh as o9,Ei as qk,F as of,Fa as M2,Fb as Xa,Fc as VT,Fd as iI,Fe as yI,Ff as $I,Fg as Ue,Fh as v1,Fi as Qs,G as aT,Ga as Jn,Gb as DT,Gc as js,Gd as il,Ge as XW,Gf as YI,Gg as hn,Gh as at,Gi as Gk,H as Sn,Ha as tc,Hb as RT,Hc as KT,Hd as nI,He as SI,Hf as XI,Hg as zf,Hh as Zo,Hi as p9,I as Cn,Ia as zs,Ib as MT,Ic as _f,Id as rI,Ie as Qd,If as QI,Ig as e9,Ih as Ak,Ii as hj,J as ec,Ja as oe,Jb as OT,Jc as vf,Jd as oI,Je as QW,Jf as JI,Jg as mk,Jh as b1,Ji as rg,K as Nt,Ka as uf,Kb as pf,Kc as oc,Kd as sI,Ke as CI,Kf as $o,Kg as qs,Kh as s9,Ki as S1,L as De,La as te,Lb as PT,Lc as V2,Ld as aI,Le as JW,Lf as o1,Lg as pk,Lh as Lk,Li as $k,M as L2,Ma as ET,Mb as FT,Mc as el,Md as lI,Me as Jd,Mf as s1,Mg as Uf,Mh as Nk,Mi as Yk,N as lT,Na as on,Nb as B2,Nc as qW,Nd as cc,Ne as ZW,Nf as a1,Ng as Xo,Nh as a9,Ni as f9,O as wt,Oa as Vi,Ob as Bt,Oc as jd,Od as Vs,Oe as wI,Of as l1,Og as fk,Oh as Dk,Oi as g9,P as cT,Pa as TT,Pb as $,Pc as Ju,Pd as Tf,Pe as ej,Pf as ZI,Pg as p1,Ph as $f,Pi as _9,Q as dT,Qa as zd,Qb as Ne,Qc as Zu,Qd as If,Qe as xI,Qf as Pf,Qg as gk,Qh as Rk,Qi as Xk,R as hT,Ra as gt,Rb as we,Rc as e1,Rd as cI,Re as tj,Rf as Zd,Rg as Wf,Rh as Mk,Ri as Qk,S as sf,Sa as Kt,Sb as qe,Sc as GW,Sd as dI,Se as EI,Sf as Q2,Sg as le,Sh as Ok,Si as og,T as af,Ta as IT,Tb as HT,Tc as Uo,Td as hI,Te as ij,Tf as c1,Tg as ut,Th as l9,Ti as Jk,U as N2,Ua as wr,Ub as BT,Uc as sc,Ud as YW,Ue as Ko,Uf as kn,Ug as jf,Uh as Ys,Ui as Zk,V as $u,Va as Ce,Vb as zT,Vc as bf,Vd as uI,Ve as pe,Vf as Ff,Vg as f1,Vh as Pk,Vi as v9,W as uT,Wa as Zn,Wb as tr,Wc as qT,Wd as $2,We as de,Wf as An,Wg as _k,Wh as Fk,Wi as eA,X as ot,Xa as st,Xb as rc,Xc as K2,Xd as qd,Xe as TI,Xf as d1,Xg as g1,Xh as Qt,Xi as C1,Y as $a,Ya as _t,Yb as Er,Yc as Wo,Yd as mI,Ye as i1,Yf as ek,Yg as _1,Yh as Yf,Yi as sg,Z as mT,Za as En,Zb as z2,Zc as q2,Zd as In,Ze as II,Zf as qi,Zg as rh,Zh as Hk,Zi as b9,_ as ji,_a as ie,_b as UT,_c as GT,_d as pI,_e as Yr,_f as Lt,_g as ri,_h as rr,_i as y9,a as g,aa as It,ab as Ri,ac as go,ad as $T,ae as fI,af as Nf,ag as cn,ah as Gs,ai as Bk,aj as tA,b as be,ba as Bs,bb as Ya,bc as qr,bd as yf,be as t1,bf as Df,bg as Hf,bh as mc,bi as pc,bj as iA,c as Be,ca as D2,cb as Ki,cc as Qu,cd as YT,ce as Tr,cf as kI,cg as tk,ch as mt,ci as c9,cj as nA,d as bt,da as WW,db as Us,dc as zo,dd as XT,de as pi,df as AI,dg as h1,dh as un,di as Xf,dj as ag,e as Wr,ea as lf,eb as Kr,ec as Gr,ed as QT,ee as nl,ef as LI,eg as ik,eh as vk,ei as di,ej as w1,f as Zp,fa as pT,fb as fo,fc as Ft,fd as JT,fe as ze,ff as Rf,fg as nk,fh as Vf,fi as Xr,fj as rA,g as Jl,ga as fT,gb as Yu,gc as mi,gd as Dt,ge as qt,gf as Mf,gg as nj,gh as bk,gi as Gi,gj as C9,h as Zl,ha as jW,hb as mf,hc as Tn,hd as ZT,he as Gt,hf as Of,hg as Bf,hh as yk,hi as sh,hj as oA,i as it,ia as gT,ib as ic,ic as Qa,id as $W,ie as Ht,if as NI,ig as rj,ih as Sk,ii as Xs,ij as lh,j as iT,ja as Bd,jb as Re,jc as Ja,jd as Sf,je as kf,jf as DI,jg as u1,jh as Ck,ji as Qf,jj as oi,k as UW,ka as cf,kb as sn,kc as ff,kd as eI,ke as Ir,kf as RI,kg as Yo,kh as wk,ki as d9,kj as sA,l as jr,la as _T,lb as je,lc as gf,ld as nt,le as $d,lf as MI,lg as rk,lh as t9,li as zk,lj as w9,m as ef,ma as Qe,mb as er,mc as ni,md as an,me as dc,mf as n1,mg as _o,mh as lj,mi as Jf,mj as aA,n as tf,na as wn,nb as Pt,nc as K,nd as ci,ne as Af,nf as OI,ng as m1,nh as $s,ni as h9,nj as x9,o as ti,oa as po,ob as Je,oc as U2,od as $r,oe as jo,of as r1,og as ok,oh as Kf,oi as Uk,oj as lg,p as k2,pa as df,pb as Ci,pc as Za,pd as ir,pe as kt,pf as Go,pg as sk,ph as xk,pi as cj,pj as ch,q as ft,qa as rn,qb as Ud,qc as Un,qd as ac,qe as Lf,qf as Ks,qg as th,qh as oh,qi as Wk,qj as lA,r as W,ra as vT,rb as O2,rc as ge,rd as Cf,re as gI,rf as PI,rg as ak,rh as qf,ri as u9,rj as uj,s as Y,sa as jt,sb as kT,sc as F,sd as tI,se as nr,sf as uc,sg as J2,sh as i9,si as jk,sj as es,t as li,ta as Vr,tb as xr,tc as W2,td as Vd,te as _I,tf as FI,tg as ih,th as kr,ti as Vk,tj as dh,u as nT,ua as bT,ub as Ws,uc as WT,ud as G2,ue as ct,uf as X2,ug as dn,uh as Ek,ui as dj,uj as Js,v as re,va as R2,vb as AT,vc as Se,vd as rt,ve as vI,vf as HI,vg as lk,vh as Gf,vi as ah,vj as hh,w as nf,wa as yT,wb as LT,wc as Me,wd as ln,we as Yd,wf as BI,wg as ck,wh as ol,wi as Zf,x as rT,xa as hf,xb as nc,xc as k,xd as wf,xe as Y2,xf as zI,xg as dk,xh as Jo,xi as y1,y as Hd,ya as Vt,yb as Xu,yc as Ie,yd as tl,ye as Wn,yf as UI,yg as oj,yh as n9,yi as eg,z as Wi,za as ST,zb as Yt,zc as ye,zd as lc,ze as Vo,zf as WI,zg as hk,zh as r9,zi as tg}from"./chunk-ITWFYK6C.js";import{a as me,b as Xe,c as Xl,d as Ho,e as Ka,f as lt,g as zW,h as Ui,i as mo}from"./chunk-2YVZDWG7.js";var $A=lt(()=>{});var Ag=lt((kg,YA)=>{(function(i,e){typeof kg=="object"?YA.exports=kg=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(kg,function(){var i=i||function(e,t){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof Xl=="function")try{n=$A()}catch(b){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(b){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(b){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function b(){}return function(C){var T;return b.prototype=C,T=new b,b.prototype=null,T}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(b){var C=o(this);return b&&C.mixIn(b),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var C in b)b.hasOwnProperty(C)&&(this[C]=b[C]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(b,C){b=this.words=b||[],C!=t?this.sigBytes=C:this.sigBytes=b.length*4},toString:function(b){return(b||h).stringify(this)},concat:function(b){var C=this.words,T=b.words,w=this.sigBytes,A=b.sigBytes;if(this.clamp(),w%4)for(var O=0;O>>2]>>>24-O%4*8&255;C[w+O>>>2]|=R<<24-(w+O)%4*8}else for(var j=0;j>>2]=T[j>>>2];return this.sigBytes+=A,this},clamp:function(){var b=this.words,C=this.sigBytes;b[C>>>2]&=4294967295<<32-C%4*8,b.length=e.ceil(C/4)},clone:function(){var b=l.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var C=[],T=0;T>>2]>>>24-A%4*8&255;w.push((O>>>4).toString(16)),w.push((O&15).toString(16))}return w.join("")},parse:function(b){for(var C=b.length,T=[],w=0;w >>3]|=parseInt(b.substr(w,2),16)<<24-w%8*4;return new c.init(T,C/2)}},u=d.Latin1={stringify:function(b){for(var C=b.words,T=b.sigBytes,w=[],A=0;A >>2]>>>24-A%4*8&255;w.push(String.fromCharCode(O))}return w.join("")},parse:function(b){for(var C=b.length,T=[],w=0;w >>2]|=(b.charCodeAt(w)&255)<<24-w%4*8;return new c.init(T,C)}},m=d.Utf8={stringify:function(b){try{return decodeURIComponent(escape(u.stringify(b)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(b){return u.parse(unescape(encodeURIComponent(b)))}},p=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=m.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var C,T=this._data,w=T.words,A=T.sigBytes,O=this.blockSize,R=O*4,j=A/R;b?j=e.ceil(j):j=e.max((j|0)-this._minBufferSize,0);var q=j*O,_e=e.min(q*4,A);if(q){for(var J=0;J {(function(i,e){typeof Lg=="object"?XA.exports=Lg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Lg,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[];(function(){for(var m=0;m<64;m++)a[m]=e.abs(e.sin(m+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,p){for(var f=0;f<16;f++){var _=p+f,b=m[_];m[_]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var C=this._hash.words,T=m[p+0],w=m[p+1],A=m[p+2],O=m[p+3],R=m[p+4],j=m[p+5],q=m[p+6],_e=m[p+7],J=m[p+8],ke=m[p+9],Oe=m[p+10],Pe=m[p+11],et=m[p+12],B=m[p+13],Z=m[p+14],ee=m[p+15],V=C[0],H=C[1],U=C[2],X=C[3];V=c(V,H,U,X,T,7,a[0]),X=c(X,V,H,U,w,12,a[1]),U=c(U,X,V,H,A,17,a[2]),H=c(H,U,X,V,O,22,a[3]),V=c(V,H,U,X,R,7,a[4]),X=c(X,V,H,U,j,12,a[5]),U=c(U,X,V,H,q,17,a[6]),H=c(H,U,X,V,_e,22,a[7]),V=c(V,H,U,X,J,7,a[8]),X=c(X,V,H,U,ke,12,a[9]),U=c(U,X,V,H,Oe,17,a[10]),H=c(H,U,X,V,Pe,22,a[11]),V=c(V,H,U,X,et,7,a[12]),X=c(X,V,H,U,B,12,a[13]),U=c(U,X,V,H,Z,17,a[14]),H=c(H,U,X,V,ee,22,a[15]),V=d(V,H,U,X,w,5,a[16]),X=d(X,V,H,U,q,9,a[17]),U=d(U,X,V,H,Pe,14,a[18]),H=d(H,U,X,V,T,20,a[19]),V=d(V,H,U,X,j,5,a[20]),X=d(X,V,H,U,Oe,9,a[21]),U=d(U,X,V,H,ee,14,a[22]),H=d(H,U,X,V,R,20,a[23]),V=d(V,H,U,X,ke,5,a[24]),X=d(X,V,H,U,Z,9,a[25]),U=d(U,X,V,H,O,14,a[26]),H=d(H,U,X,V,J,20,a[27]),V=d(V,H,U,X,B,5,a[28]),X=d(X,V,H,U,A,9,a[29]),U=d(U,X,V,H,_e,14,a[30]),H=d(H,U,X,V,et,20,a[31]),V=h(V,H,U,X,j,4,a[32]),X=h(X,V,H,U,J,11,a[33]),U=h(U,X,V,H,Pe,16,a[34]),H=h(H,U,X,V,Z,23,a[35]),V=h(V,H,U,X,w,4,a[36]),X=h(X,V,H,U,R,11,a[37]),U=h(U,X,V,H,_e,16,a[38]),H=h(H,U,X,V,Oe,23,a[39]),V=h(V,H,U,X,B,4,a[40]),X=h(X,V,H,U,T,11,a[41]),U=h(U,X,V,H,O,16,a[42]),H=h(H,U,X,V,q,23,a[43]),V=h(V,H,U,X,ke,4,a[44]),X=h(X,V,H,U,et,11,a[45]),U=h(U,X,V,H,ee,16,a[46]),H=h(H,U,X,V,A,23,a[47]),V=u(V,H,U,X,T,6,a[48]),X=u(X,V,H,U,_e,10,a[49]),U=u(U,X,V,H,Z,15,a[50]),H=u(H,U,X,V,j,21,a[51]),V=u(V,H,U,X,et,6,a[52]),X=u(X,V,H,U,O,10,a[53]),U=u(U,X,V,H,Oe,15,a[54]),H=u(H,U,X,V,w,21,a[55]),V=u(V,H,U,X,J,6,a[56]),X=u(X,V,H,U,ee,10,a[57]),U=u(U,X,V,H,q,15,a[58]),H=u(H,U,X,V,B,21,a[59]),V=u(V,H,U,X,R,6,a[60]),X=u(X,V,H,U,Pe,10,a[61]),U=u(U,X,V,H,A,15,a[62]),H=u(H,U,X,V,ke,21,a[63]),C[0]=C[0]+V|0,C[1]=C[1]+H|0,C[2]=C[2]+U|0,C[3]=C[3]+X|0},_doFinalize:function(){var m=this._data,p=m.words,f=this._nDataBytes*8,_=m.sigBytes*8;p[_>>>5]|=128<<24-_%32;var b=e.floor(f/4294967296),C=f;p[(_+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p[(_+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,m.sigBytes=(p.length+1)*4,this._process();for(var T=this._hash,w=T.words,A=0;A<4;A++){var O=w[A];w[A]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return T},clone:function(){var m=o.clone.call(this);return m._hash=this._hash.clone(),m}});function c(m,p,f,_,b,C,T){var w=m+(p&f|~p&_)+b+T;return(w<>>32-C)+p}function d(m,p,f,_,b,C,T){var w=m+(p&_|f&~_)+b+T;return(w< >>32-C)+p}function h(m,p,f,_,b,C,T){var w=m+(p^f^_)+b+T;return(w< >>32-C)+p}function u(m,p,f,_,b,C,T){var w=m+(f^(p|~_))+b+T;return(w< >>32-C)+p}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),i.MD5})});var ZA=lt((Ng,JA)=>{(function(i,e){typeof Ng=="object"?JA.exports=Ng=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Ng,function(i){return function(e){var t=i,n=t.lib,r=n.WordArray,o=n.Hasher,s=t.algo,a=[],l=[];(function(){function h(f){for(var _=e.sqrt(f),b=2;b<=_;b++)if(!(f%b))return!1;return!0}function u(f){return(f-(f|0))*4294967296|0}for(var m=2,p=0;p<64;)h(m)&&(p<8&&(a[p]=u(e.pow(m,1/2))),l[p]=u(e.pow(m,1/3)),p++),m++})();var c=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(h,u){for(var m=this._hash.words,p=m[0],f=m[1],_=m[2],b=m[3],C=m[4],T=m[5],w=m[6],A=m[7],O=0;O<64;O++){if(O<16)c[O]=h[u+O]|0;else{var R=c[O-15],j=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,q=c[O-2],_e=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;c[O]=j+c[O-7]+_e+c[O-16]}var J=C&T^~C&w,ke=p&f^p&_^f&_,Oe=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),Pe=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),et=A+Pe+J+l[O]+c[O],B=Oe+ke;A=w,w=T,T=C,C=b+et|0,b=_,_=f,f=p,p=et+B|0}m[0]=m[0]+p|0,m[1]=m[1]+f|0,m[2]=m[2]+_|0,m[3]=m[3]+b|0,m[4]=m[4]+C|0,m[5]=m[5]+T|0,m[6]=m[6]+w|0,m[7]=m[7]+A|0},_doFinalize:function(){var h=this._data,u=h.words,m=this._nDataBytes*8,p=h.sigBytes*8;return u[p>>>5]|=128<<24-p%32,u[(p+64>>>9<<4)+14]=e.floor(m/4294967296),u[(p+64>>>9<<4)+15]=m,h.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var h=o.clone.call(this);return h._hash=this._hash.clone(),h}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var tL=lt((Dg,eL)=>{(function(i,e){typeof Dg=="object"?eL.exports=Dg=e(Ag()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Dg,function(i){return function(){var e=i,t=e.lib,n=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var h=[],u=0;u >>2]>>>24-u%4*8&255,p=l[u+1>>>2]>>>24-(u+1)%4*8&255,f=l[u+2>>>2]>>>24-(u+2)%4*8&255,_=m<<16|p<<8|f,b=0;b<4&&u+b*.75 >>6*(3-b)&63));var C=d.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(a){var l=a.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h >>6-u%4*2,f=m|p;d[h>>>2]|=f<<24-h%4*8,h++}return n.create(d,h)}}(),i.enc.Base64})});var Q9=lt(($ae,wL)=>{wL.exports=function(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}});var DL=lt((Yae,NL)=>{"use strict";var zg=Object.prototype.hasOwnProperty,LL=Object.prototype.toString,xL=Object.defineProperty,EL=Object.getOwnPropertyDescriptor,TL=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LL.call(e)==="[object Array]"},IL=function(e){if(!e||LL.call(e)!=="[object Object]")return!1;var t=zg.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&zg.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||zg.call(e,r)},kL=function(e,t){xL&&t.name==="__proto__"?xL(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},AL=function(e,t){if(t==="__proto__")if(zg.call(e,t)){if(EL)return EL(e,t).value}else return;return e[t]};NL.exports=function i(){var e,t,n,r,o,s,a=arguments[0],l=1,c=arguments.length,d=!1;for(typeof a=="boolean"&&(d=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l {"use strict";var XN={};function eq(i){var e,t,n=XN[i];if(n)return n;for(n=XN[i]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e =55296&&o<=57343){if(o>=55296&&o<=56319&&n+1 =56320&&s<=57343)){l+=encodeURIComponent(i[n]+i[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(i[n])}return l}Jg.defaultChars=";/?:@&=+$,-_.!~*'()#";Jg.componentChars="-_.!~*'()";QN.exports=Jg});var i_=lt(na=>{"use strict";var aq=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];na.REPLACEMENT_CHARACTER="\uFFFD";na.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533};na.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]};na.isSurrogate=function(i){return i>=55296&&i<=57343};na.isSurrogatePair=function(i){return i>=56320&&i<=57343};na.getSurrogatePairCodePoint=function(i,e){return(i-55296)*1024+9216+e};na.isControlCodePoint=function(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159};na.isUndefinedCodePoint=function(i){return i>=64976&&i<=65007||aq.indexOf(i)>-1}});var n_=lt((l1e,gD)=>{"use strict";gD.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}});var vD=lt((c1e,_D)=>{"use strict";var wh=i_(),Dy=n_(),Sc=wh.CODE_POINTS,lq=65536,Ry=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=lq}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){let t=this.html.charCodeAt(this.pos+1);if(wh.isSurrogatePair(t))return this.pos++,this._addGap(),wh.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Sc.EOF;return this._err(Dy.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Sc.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===Sc.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===Sc.CARRIAGE_RETURN?(this.skipNextNewLine=!0,Sc.LINE_FEED):(this.skipNextNewLine=!1,wh.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===Sc.LINE_FEED||e===Sc.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){wh.isControlCodePoint(e)?this._err(Dy.controlCharacterInInputStream):wh.isUndefinedCodePoint(e)&&this._err(Dy.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}};_D.exports=Ry});var yD=lt((d1e,bD)=>{"use strict";bD.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])});var Q1=lt((h1e,vR)=>{"use strict";var cq=vD(),zt=i_(),xc=yD(),Q=n_(),D=zt.CODE_POINTS,Cc=zt.CODE_POINT_SEQUENCES,dq={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},uR=1,mR=2,pR=4,hq=uR|mR|pR,pt="DATA_STATE",Eh="RCDATA_STATE",Y1="RAWTEXT_STATE",sa="SCRIPT_DATA_STATE",fR="PLAINTEXT_STATE",SD="TAG_OPEN_STATE",CD="END_TAG_OPEN_STATE",My="TAG_NAME_STATE",wD="RCDATA_LESS_THAN_SIGN_STATE",xD="RCDATA_END_TAG_OPEN_STATE",ED="RCDATA_END_TAG_NAME_STATE",TD="RAWTEXT_LESS_THAN_SIGN_STATE",ID="RAWTEXT_END_TAG_OPEN_STATE",kD="RAWTEXT_END_TAG_NAME_STATE",AD="SCRIPT_DATA_LESS_THAN_SIGN_STATE",LD="SCRIPT_DATA_END_TAG_OPEN_STATE",ND="SCRIPT_DATA_END_TAG_NAME_STATE",DD="SCRIPT_DATA_ESCAPE_START_STATE",RD="SCRIPT_DATA_ESCAPE_START_DASH_STATE",yo="SCRIPT_DATA_ESCAPED_STATE",MD="SCRIPT_DATA_ESCAPED_DASH_STATE",Oy="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",r_="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",OD="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",PD="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",FD="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",ra="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",HD="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",BD="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",o_="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",zD="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",ss="BEFORE_ATTRIBUTE_NAME_STATE",s_="ATTRIBUTE_NAME_STATE",Py="AFTER_ATTRIBUTE_NAME_STATE",Fy="BEFORE_ATTRIBUTE_VALUE_STATE",a_="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",l_="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",c_="ATTRIBUTE_VALUE_UNQUOTED_STATE",Hy="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",ul="SELF_CLOSING_START_TAG_STATE",K1="BOGUS_COMMENT_STATE",UD="MARKUP_DECLARATION_OPEN_STATE",WD="COMMENT_START_STATE",jD="COMMENT_START_DASH_STATE",ml="COMMENT_STATE",VD="COMMENT_LESS_THAN_SIGN_STATE",KD="COMMENT_LESS_THAN_SIGN_BANG_STATE",qD="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",GD="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",d_="COMMENT_END_DASH_STATE",h_="COMMENT_END_STATE",$D="COMMENT_END_BANG_STATE",YD="DOCTYPE_STATE",u_="BEFORE_DOCTYPE_NAME_STATE",m_="DOCTYPE_NAME_STATE",XD="AFTER_DOCTYPE_NAME_STATE",QD="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",JD="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",By="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",zy="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Uy="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ZD="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",eR="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",tR="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",q1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",G1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Wy="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",oa="BOGUS_DOCTYPE_STATE",p_="CDATA_SECTION_STATE",iR="CDATA_SECTION_BRACKET_STATE",nR="CDATA_SECTION_END_STATE",xh="CHARACTER_REFERENCE_STATE",rR="NAMED_CHARACTER_REFERENCE_STATE",oR="AMBIGUOS_AMPERSAND_STATE",sR="NUMERIC_CHARACTER_REFERENCE_STATE",aR="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",lR="DECIMAL_CHARACTER_REFERENCE_START_STATE",cR="HEXADEMICAL_CHARACTER_REFERENCE_STATE",dR="DECIMAL_CHARACTER_REFERENCE_STATE",$1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function si(i){return i===D.SPACE||i===D.LINE_FEED||i===D.TABULATION||i===D.FORM_FEED}function X1(i){return i>=D.DIGIT_0&&i<=D.DIGIT_9}function So(i){return i>=D.LATIN_CAPITAL_A&&i<=D.LATIN_CAPITAL_Z}function wc(i){return i>=D.LATIN_SMALL_A&&i<=D.LATIN_SMALL_Z}function fl(i){return wc(i)||So(i)}function jy(i){return fl(i)||X1(i)}function gR(i){return i>=D.LATIN_CAPITAL_A&&i<=D.LATIN_CAPITAL_F}function _R(i){return i>=D.LATIN_SMALL_A&&i<=D.LATIN_SMALL_F}function uq(i){return X1(i)||gR(i)||_R(i)}function f_(i){return i+32}function wi(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode(i>>>10&1023|55296)+String.fromCharCode(56320|i&1023))}function pl(i){return String.fromCharCode(f_(i))}function hR(i,e){let t=xc[++i],n=++i,r=n+t-1;for(;n<=r;){let o=n+r>>>1,s=xc[o];if(s e)r=o-1;else return xc[o+t]}return-1}var lr=class i{constructor(){this.preprocessor=new cq,this.tokenQueue=[],this.allowCDATA=!1,this.state=pt,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:i.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,o=!0,s=e.length,a=0,l=t,c;for(;a 0&&(l=this._consume(),r++),l===D.EOF){o=!1;break}if(c=e[a],l!==c&&(n||l!==f_(c))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==Cc.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(Q.endTagWithAttributes),e.selfClosing&&this._err(Q.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=i.CHARACTER_TOKEN;si(e)?t=i.WHITESPACE_CHARACTER_TOKEN:e===D.NULL&&(t=i.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,wi(e))}_emitSeveralCodePoints(e){for(let t=0;t -1;){let o=xc[r],s=o ")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=yo,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=yo,this._emitCodePoint(e))}[r_](e){e===D.SOLIDUS?(this.tempBuff=[],this.state=OD):fl(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(FD)):(this._emitChars("<"),this._reconsumeInState(yo))}[OD](e){fl(e)?(this._createEndTagToken(),this._reconsumeInState(PD)):(this._emitChars(""),this._reconsumeInState(yo))}[PD](e){if(So(e))this.currentToken.tagName+=pl(e),this.tempBuff.push(e);else if(wc(e))this.currentToken.tagName+=wi(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(si(e)){this.state=ss;return}if(e===D.SOLIDUS){this.state=ul;return}if(e===D.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=pt;return}}this._emitChars(""),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(yo)}}[FD](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?ra:yo,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(yo)}[ra](e){e===D.HYPHEN_MINUS?(this.state=HD,this._emitChars("-")):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}[HD](e){e===D.HYPHEN_MINUS?(this.state=BD,this._emitChars("-")):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[BD](e){e===D.HYPHEN_MINUS?this._emitChars("-"):e===D.LESS_THAN_SIGN?(this.state=o_,this._emitChars("<")):e===D.GREATER_THAN_SIGN?(this.state=sa,this._emitChars(">")):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.state=ra,this._emitChars(zt.REPLACEMENT_CHARACTER)):e===D.EOF?(this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=ra,this._emitCodePoint(e))}[o_](e){e===D.SOLIDUS?(this.tempBuff=[],this.state=zD,this._emitChars("/")):this._reconsumeInState(ra)}[zD](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?yo:ra,this._emitCodePoint(e)):So(e)?(this.tempBuff.push(f_(e)),this._emitCodePoint(e)):wc(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(ra)}[ss](e){si(e)||(e===D.SOLIDUS||e===D.GREATER_THAN_SIGN||e===D.EOF?this._reconsumeInState(Py):e===D.EQUALS_SIGN?(this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=s_):(this._createAttr(""),this._reconsumeInState(s_)))}[s_](e){si(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN||e===D.EOF?(this._leaveAttrName(Py),this._unconsume()):e===D.EQUALS_SIGN?this._leaveAttrName(Fy):So(e)?this.currentAttr.name+=pl(e):e===D.QUOTATION_MARK||e===D.APOSTROPHE||e===D.LESS_THAN_SIGN?(this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=wi(e)):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=zt.REPLACEMENT_CHARACTER):this.currentAttr.name+=wi(e)}[Py](e){si(e)||(e===D.SOLIDUS?this.state=ul:e===D.EQUALS_SIGN?this.state=Fy:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(s_)))}[Fy](e){si(e)||(e===D.QUOTATION_MARK?this.state=a_:e===D.APOSTROPHE?this.state=l_:e===D.GREATER_THAN_SIGN?(this._err(Q.missingAttributeValue),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(c_))}[a_](e){e===D.QUOTATION_MARK?this.state=Hy:e===D.AMPERSAND?(this.returnState=a_,this.state=xh):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[l_](e){e===D.APOSTROPHE?this.state=Hy:e===D.AMPERSAND?(this.returnState=l_,this.state=xh):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[c_](e){si(e)?this._leaveAttrValue(ss):e===D.AMPERSAND?(this.returnState=c_,this.state=xh):e===D.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=zt.REPLACEMENT_CHARACTER):e===D.QUOTATION_MARK||e===D.APOSTROPHE||e===D.LESS_THAN_SIGN||e===D.EQUALS_SIGN||e===D.GRAVE_ACCENT?(this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=wi(e)):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):this.currentAttr.value+=wi(e)}[Hy](e){si(e)?this._leaveAttrValue(ss):e===D.SOLIDUS?this._leaveAttrValue(ul):e===D.GREATER_THAN_SIGN?(this._leaveAttrValue(pt),this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.missingWhitespaceBetweenAttributes),this._reconsumeInState(ss))}[ul](e){e===D.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInTag),this._emitEOFToken()):(this._err(Q.unexpectedSolidusInTag),this._reconsumeInState(ss))}[K1](e){e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):this.currentToken.data+=wi(e)}[UD](e){this._consumeSequenceIfMatch(Cc.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=WD):this._consumeSequenceIfMatch(Cc.DOCTYPE_STRING,e,!1)?this.state=YD:this._consumeSequenceIfMatch(Cc.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=p_:(this._err(Q.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=K1):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(K1))}[WD](e){e===D.HYPHEN_MINUS?this.state=jD:e===D.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):this._reconsumeInState(ml)}[jD](e){e===D.HYPHEN_MINUS?this.state=h_:e===D.GREATER_THAN_SIGN?(this._err(Q.abruptClosingOfEmptyComment),this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[ml](e){e===D.HYPHEN_MINUS?this.state=d_:e===D.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=VD):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.data+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=wi(e)}[VD](e){e===D.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=KD):e===D.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ml)}[KD](e){e===D.HYPHEN_MINUS?this.state=qD:this._reconsumeInState(ml)}[qD](e){e===D.HYPHEN_MINUS?this.state=GD:this._reconsumeInState(d_)}[GD](e){e!==D.GREATER_THAN_SIGN&&e!==D.EOF&&this._err(Q.nestedComment),this._reconsumeInState(h_)}[d_](e){e===D.HYPHEN_MINUS?this.state=h_:e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ml))}[h_](e){e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EXCLAMATION_MARK?this.state=$D:e===D.HYPHEN_MINUS?this.currentToken.data+="-":e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ml))}[$D](e){e===D.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=d_):e===D.GREATER_THAN_SIGN?(this._err(Q.incorrectlyClosedComment),this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ml))}[YD](e){si(e)?this.state=u_:e===D.GREATER_THAN_SIGN?this._reconsumeInState(u_):e===D.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(u_))}[u_](e){si(e)||(So(e)?(this._createDoctypeToken(pl(e)),this.state=m_):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(zt.REPLACEMENT_CHARACTER),this.state=m_):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(wi(e)),this.state=m_))}[m_](e){si(e)?this.state=XD:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):So(e)?this.currentToken.name+=pl(e):e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.name+=zt.REPLACEMENT_CHARACTER):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=wi(e)}[XD](e){si(e)||(e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(Cc.PUBLIC_STRING,e,!1)?this.state=QD:this._consumeSequenceIfMatch(Cc.SYSTEM_STRING,e,!1)?this.state=eR:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[QD](e){si(e)?this.state=JD:e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=By):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=zy):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[JD](e){si(e)||(e===D.QUOTATION_MARK?(this.currentToken.publicId="",this.state=By):e===D.APOSTROPHE?(this.currentToken.publicId="",this.state=zy):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[By](e){e===D.QUOTATION_MARK?this.state=Uy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=wi(e)}[zy](e){e===D.APOSTROPHE?this.state=Uy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.publicId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=wi(e)}[Uy](e){si(e)?this.state=ZD:e===D.GREATER_THAN_SIGN?(this.state=pt,this._emitCurrentToken()):e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=G1):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[ZD](e){si(e)||(e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[eR](e){si(e)?this.state=tR:e===D.QUOTATION_MARK?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=G1):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa))}[tR](e){si(e)||(e===D.QUOTATION_MARK?(this.currentToken.systemId="",this.state=q1):e===D.APOSTROPHE?(this.currentToken.systemId="",this.state=G1):e===D.GREATER_THAN_SIGN?(this._err(Q.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=pt,this._emitCurrentToken()):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(oa)))}[q1](e){e===D.QUOTATION_MARK?this.state=Wy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=wi(e)}[G1](e){e===D.APOSTROPHE?this.state=Wy:e===D.NULL?(this._err(Q.unexpectedNullCharacter),this.currentToken.systemId+=zt.REPLACEMENT_CHARACTER):e===D.GREATER_THAN_SIGN?(this._err(Q.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=wi(e)}[Wy](e){si(e)||(e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.EOF?(this._err(Q.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(oa)))}[oa](e){e===D.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=pt):e===D.NULL?this._err(Q.unexpectedNullCharacter):e===D.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[p_](e){e===D.RIGHT_SQUARE_BRACKET?this.state=iR:e===D.EOF?(this._err(Q.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[iR](e){e===D.RIGHT_SQUARE_BRACKET?this.state=nR:(this._emitChars("]"),this._reconsumeInState(p_))}[nR](e){e===D.GREATER_THAN_SIGN?this.state=pt:e===D.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(p_))}[xh](e){this.tempBuff=[D.AMPERSAND],e===D.NUMBER_SIGN?(this.tempBuff.push(e),this.state=sR):jy(e)?this._reconsumeInState(rR):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[rR](e){let t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[D.AMPERSAND];else if(t){let n=this.tempBuff[this.tempBuff.length-1]===D.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(Q.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=oR}[oR](e){jy(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=wi(e):this._emitCodePoint(e):(e===D.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[sR](e){this.charRefCode=0,e===D.LATIN_SMALL_X||e===D.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=aR):this._reconsumeInState(lR)}[aR](e){uq(e)?this._reconsumeInState(cR):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[lR](e){X1(e)?this._reconsumeInState(dR):(this._err(Q.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[cR](e){gR(e)?this.charRefCode=this.charRefCode*16+e-55:_R(e)?this.charRefCode=this.charRefCode*16+e-87:X1(e)?this.charRefCode=this.charRefCode*16+e-48:e===D.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[dR](e){X1(e)?this.charRefCode=this.charRefCode*10+e-48:e===D.SEMICOLON?this.state=$1:(this._err(Q.missingSemicolonAfterCharacterReference),this._reconsumeInState($1))}[$1](){if(this.charRefCode===D.NULL)this._err(Q.nullCharacterReference),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Q.characterReferenceOutsideUnicodeRange),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(zt.isSurrogate(this.charRefCode))this._err(Q.surrogateCharacterReference),this.charRefCode=D.REPLACEMENT_CHARACTER;else if(zt.isUndefinedCodePoint(this.charRefCode))this._err(Q.noncharacterCharacterReference);else if(zt.isControlCodePoint(this.charRefCode)||this.charRefCode===D.CARRIAGE_RETURN){this._err(Q.controlCharacterReference);let e=dq[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};lr.CHARACTER_TOKEN="CHARACTER_TOKEN";lr.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN";lr.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN";lr.START_TAG_TOKEN="START_TAG_TOKEN";lr.END_TAG_TOKEN="END_TAG_TOKEN";lr.COMMENT_TOKEN="COMMENT_TOKEN";lr.DOCTYPE_TOKEN="DOCTYPE_TOKEN";lr.EOF_TOKEN="EOF_TOKEN";lr.HIBERNATION_TOKEN="HIBERNATION_TOKEN";lr.MODE={DATA:pt,RCDATA:Eh,RAWTEXT:Y1,SCRIPT_DATA:sa,PLAINTEXT:fR};lr.getTokenAttr=function(i,e){for(let t=i.attrs.length-1;t>=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null};vR.exports=lr});var Ec=lt(Th=>{"use strict";var Vy=Th.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};Th.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"};Th.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var ue=Th.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};Th.SPECIAL_ELEMENTS={[Vy.HTML]:{[ue.ADDRESS]:!0,[ue.APPLET]:!0,[ue.AREA]:!0,[ue.ARTICLE]:!0,[ue.ASIDE]:!0,[ue.BASE]:!0,[ue.BASEFONT]:!0,[ue.BGSOUND]:!0,[ue.BLOCKQUOTE]:!0,[ue.BODY]:!0,[ue.BR]:!0,[ue.BUTTON]:!0,[ue.CAPTION]:!0,[ue.CENTER]:!0,[ue.COL]:!0,[ue.COLGROUP]:!0,[ue.DD]:!0,[ue.DETAILS]:!0,[ue.DIR]:!0,[ue.DIV]:!0,[ue.DL]:!0,[ue.DT]:!0,[ue.EMBED]:!0,[ue.FIELDSET]:!0,[ue.FIGCAPTION]:!0,[ue.FIGURE]:!0,[ue.FOOTER]:!0,[ue.FORM]:!0,[ue.FRAME]:!0,[ue.FRAMESET]:!0,[ue.H1]:!0,[ue.H2]:!0,[ue.H3]:!0,[ue.H4]:!0,[ue.H5]:!0,[ue.H6]:!0,[ue.HEAD]:!0,[ue.HEADER]:!0,[ue.HGROUP]:!0,[ue.HR]:!0,[ue.HTML]:!0,[ue.IFRAME]:!0,[ue.IMG]:!0,[ue.INPUT]:!0,[ue.LI]:!0,[ue.LINK]:!0,[ue.LISTING]:!0,[ue.MAIN]:!0,[ue.MARQUEE]:!0,[ue.MENU]:!0,[ue.META]:!0,[ue.NAV]:!0,[ue.NOEMBED]:!0,[ue.NOFRAMES]:!0,[ue.NOSCRIPT]:!0,[ue.OBJECT]:!0,[ue.OL]:!0,[ue.P]:!0,[ue.PARAM]:!0,[ue.PLAINTEXT]:!0,[ue.PRE]:!0,[ue.SCRIPT]:!0,[ue.SECTION]:!0,[ue.SELECT]:!0,[ue.SOURCE]:!0,[ue.STYLE]:!0,[ue.SUMMARY]:!0,[ue.TABLE]:!0,[ue.TBODY]:!0,[ue.TD]:!0,[ue.TEMPLATE]:!0,[ue.TEXTAREA]:!0,[ue.TFOOT]:!0,[ue.TH]:!0,[ue.THEAD]:!0,[ue.TITLE]:!0,[ue.TR]:!0,[ue.TRACK]:!0,[ue.UL]:!0,[ue.WBR]:!0,[ue.XMP]:!0},[Vy.MATHML]:{[ue.MI]:!0,[ue.MO]:!0,[ue.MN]:!0,[ue.MS]:!0,[ue.MTEXT]:!0,[ue.ANNOTATION_XML]:!0},[Vy.SVG]:{[ue.TITLE]:!0,[ue.FOREIGN_OBJECT]:!0,[ue.DESC]:!0}}});var CR=lt((m1e,SR)=>{"use strict";var yR=Ec(),fe=yR.TAG_NAMES,Ut=yR.NAMESPACES;function bR(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI;case 3:return i===fe.RTC;case 6:return i===fe.OPTION;case 8:return i===fe.OPTGROUP}return!1}function mq(i){switch(i.length){case 1:return i===fe.P;case 2:return i===fe.RB||i===fe.RP||i===fe.RT||i===fe.DD||i===fe.DT||i===fe.LI||i===fe.TD||i===fe.TH||i===fe.TR;case 3:return i===fe.RTC;case 5:return i===fe.TBODY||i===fe.TFOOT||i===fe.THEAD;case 6:return i===fe.OPTION;case 7:return i===fe.CAPTION;case 8:return i===fe.OPTGROUP||i===fe.COLGROUP}return!1}function g_(i,e){switch(i.length){case 2:if(i===fe.TD||i===fe.TH)return e===Ut.HTML;if(i===fe.MI||i===fe.MO||i===fe.MN||i===fe.MS)return e===Ut.MATHML;break;case 4:if(i===fe.HTML)return e===Ut.HTML;if(i===fe.DESC)return e===Ut.SVG;break;case 5:if(i===fe.TABLE)return e===Ut.HTML;if(i===fe.MTEXT)return e===Ut.MATHML;if(i===fe.TITLE)return e===Ut.SVG;break;case 6:return(i===fe.APPLET||i===fe.OBJECT)&&e===Ut.HTML;case 7:return(i===fe.CAPTION||i===fe.MARQUEE)&&e===Ut.HTML;case 8:return i===fe.TEMPLATE&&e===Ut.HTML;case 13:return i===fe.FOREIGN_OBJECT&&e===Ut.SVG;case 14:return i===fe.ANNOTATION_XML&&e===Ut.MATHML}return!1}var Ky=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===fe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Ut.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){let n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){let t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===Ut.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){let t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.H1||e===fe.H2||e===fe.H3||e===fe.H4||e===fe.H5||e===fe.H6&&t===Ut.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){let e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===fe.TD||e===fe.TH&&t===Ut.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==fe.TABLE&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==fe.TBODY&&this.currentTagName!==fe.TFOOT&&this.currentTagName!==fe.THEAD&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==fe.TR&&this.currentTagName!==fe.TEMPLATE&&this.currentTagName!==fe.HTML||this.treeAdapter.getNamespaceURI(this.current)!==Ut.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){let e=this.items[1];return e&&this.treeAdapter.getTagName(e)===fe.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===fe.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(g_(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===fe.H1||t===fe.H2||t===fe.H3||t===fe.H4||t===fe.H5||t===fe.H6)&&n===Ut.HTML)return!0;if(g_(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if((n===fe.UL||n===fe.OL)&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Ut.HTML)return!0;if(n===fe.BUTTON&&r===Ut.HTML||g_(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n===fe.TABLE||n===fe.TEMPLATE||n===fe.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===Ut.HTML){if(t===fe.TBODY||t===fe.THEAD||t===fe.TFOOT)return!0;if(t===fe.TABLE||t===fe.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){let n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===Ut.HTML){if(n===e)return!0;if(n!==fe.OPTION&&n!==fe.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;bR(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;mq(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;bR(this.currentTagName)&&this.currentTagName!==e;)this.pop()}};SR.exports=Ky});var xR=lt((p1e,wR)=>{"use strict";var J1=class i{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){let t=[];if(this.length>=3){let n=this.treeAdapter.getAttrList(e).length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let s=this.length-1;s>=0;s--){let a=this.entries[s];if(a.type===i.MARKER_ENTRY)break;let l=a.element,c=this.treeAdapter.getAttrList(l);this.treeAdapter.getTagName(l)===r&&this.treeAdapter.getNamespaceURI(l)===o&&c.length===n&&t.push({idx:s,attrs:c})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){let t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){let r=this.treeAdapter.getAttrList(e),o=r.length,s=Object.create(null);for(let a=0;a =3-1;a--)this.entries.splice(t[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:i.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:i.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){let e=this.entries.pop();if(this.length--,e.type===i.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){let n=this.entries[t];if(n.type===i.ELEMENT_ENTRY&&n.element===e)return n}return null}};J1.MARKER_ENTRY="MARKER_ENTRY";J1.ELEMENT_ENTRY="ELEMENT_ENTRY";wR.exports=J1});var as=lt((f1e,ER)=>{"use strict";var __=class{constructor(e){let t={},n=this._getOverriddenMethods(this,t);for(let r of Object.keys(n))typeof n[r]=="function"&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}};__.install=function(i,e,t){i.__mixins||(i.__mixins=[]);for(let r=0;r {"use strict";var pq=as(),qy=class extends pq{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){let n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),(r===` `||r==="\r"&&this.html[n+1]!==` `)&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){let n=this.pos;t.dropParsedChunk.call(this);let r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}};TR.exports=qy});var Xy=lt((_1e,kR)=>{"use strict";var IR=as(),$y=Q1(),fq=Gy(),Yy=class extends IR{constructor(e){super(e),this.tokenizer=e,this.posTracker=IR.install(e.preprocessor,fq),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;let e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){let n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(r){t._createDoctypeToken.call(this,r),this.currentToken.location=e.ctLoc},_createCharacterToken(r,o){t._createCharacterToken.call(this,r,o),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(r){t._createAttr.call(this,r),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(r){t._leaveAttrName.call(this,r),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(r){t._leaveAttrValue.call(this,r),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){let r=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentToken.type===$y.EOF_TOKEN?(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset):(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col+1,r.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){let r=this.currentCharacterToken&&this.currentCharacterToken.location;r&&r.endOffset===-1&&(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col,r.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys($y.MODE).forEach(r=>{let o=$y.MODE[r];n[o]=function(s){e.ctLoc=e._getCurrentLocation(),t[o].call(this,s)}}),n}};kR.exports=Yy});var LR=lt((v1e,AR)=>{"use strict";var gq=as(),Qy=class extends gq{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let n=this.stackTop;n>0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}};AR.exports=Qy});var RR=lt((b1e,DR)=>{"use strict";var Jy=as(),NR=Q1(),_q=Xy(),vq=LR(),bq=Ec(),Zy=bq.TAG_NAMES,e3=class extends Jy{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let r=t.location,o=this.treeAdapter.getTagName(e),s=t.type===NR.END_TAG_TOKEN&&o===t.tagName,a={};s?(a.endTag=Object.assign({},r),a.endLine=r.endLine,a.endCol=r.endCol,a.endOffset=r.endOffset):(a.endLine=r.startLine,a.endCol=r.startCol,a.endOffset=r.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;let o=Jy.install(this.tokenizer,_q);e.posTracker=o.posTracker,Jy.install(this.openElements,vq,{onItemPop:function(s){e._setEndLocation(s,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===NR.END_TAG_TOKEN&&(n.tagName===Zy.HTML||n.tagName===Zy.BODY&&this.openElements.hasInScope(Zy.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){let s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===n.tagName){e._setEndLocation(s,n);break}}},_setDocumentType(n){t._setDocumentType.call(this,n);let r=this.treeAdapter.getChildNodes(this.document),o=r.length;for(let s=0;s {"use strict";var yq=as(),t3=class extends yq{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){let t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}};MR.exports=t3});var PR=lt((S1e,OR)=>{"use strict";var Sq=v_(),Cq=Gy(),wq=as(),i3=class extends Sq{constructor(e,t){super(e,t),this.posTracker=wq.install(e,Cq),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}};OR.exports=i3});var HR=lt((C1e,FR)=>{"use strict";var xq=v_(),Eq=PR(),Tq=as(),n3=class extends xq{constructor(e,t){super(e,t);let n=Tq.install(e.preprocessor,Eq,t);this.posTracker=n.posTracker}};FR.exports=n3});var UR=lt((w1e,zR)=>{"use strict";var Iq=v_(),kq=HR(),Aq=Xy(),BR=as(),r3=class extends Iq{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),BR.install(this.tokenizer,kq,e.opts),BR.install(this.tokenizer,Aq)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(n,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(n)}}}};zR.exports=r3});var VR=lt(Ct=>{"use strict";var{DOCUMENT_MODE:Lq}=Ec();Ct.createDocument=function(){return{nodeName:"#document",mode:Lq.NO_QUIRKS,childNodes:[]}};Ct.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}};Ct.createElement=function(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}};Ct.createCommentNode=function(i){return{nodeName:"#comment",data:i,parentNode:null}};var WR=function(i){return{nodeName:"#text",value:i,parentNode:null}},jR=Ct.appendChild=function(i,e){i.childNodes.push(e),e.parentNode=i},Nq=Ct.insertBefore=function(i,e,t){let n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i};Ct.setTemplateContent=function(i,e){i.content=e};Ct.getTemplateContent=function(i){return i.content};Ct.setDocumentType=function(i,e,t,n){let r=null;for(let o=0;o {"use strict";KR.exports=function(e,t){return t=t||Object.create(null),[e,t].reduce((n,r)=>(Object.keys(r).forEach(o=>{n[o]=r[o]}),n),Object.create(null))}});var JR=lt(b_=>{"use strict";var{DOCUMENT_MODE:Ih}=Ec(),YR="html",Dq="about:legacy-compat",Rq="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",XR=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Mq=XR.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),Oq=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],QR=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Pq=QR.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function GR(i){let e=i.indexOf('"')!==-1?"'":'"';return e+i+e}function $R(i,e){for(let t=0;t -1)return Ih.QUIRKS;let n=e===null?Mq:XR;if($R(t,n))return Ih.QUIRKS;if(n=e===null?QR:Pq,$R(t,n))return Ih.LIMITED_QUIRKS}return Ih.NO_QUIRKS};b_.serializeContent=function(i,e,t){let n="!DOCTYPE ";return i&&(n+=i),e?n+=" PUBLIC "+GR(e):t&&(n+=" SYSTEM"),t!==null&&(n+=" "+GR(t)),n}});var eM=lt(gl=>{"use strict";var o3=Q1(),s3=Ec(),Fe=s3.TAG_NAMES,pn=s3.NAMESPACES,y_=s3.ATTRS,ZR={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Fq="definitionurl",Hq="definitionURL",Bq={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},zq={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:pn.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:pn.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:pn.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:pn.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:pn.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:pn.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:pn.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:pn.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:pn.XML},"xml:space":{prefix:"xml",name:"space",namespace:pn.XML},xmlns:{prefix:"",name:"xmlns",namespace:pn.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:pn.XMLNS}},Uq=gl.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Wq={[Fe.B]:!0,[Fe.BIG]:!0,[Fe.BLOCKQUOTE]:!0,[Fe.BODY]:!0,[Fe.BR]:!0,[Fe.CENTER]:!0,[Fe.CODE]:!0,[Fe.DD]:!0,[Fe.DIV]:!0,[Fe.DL]:!0,[Fe.DT]:!0,[Fe.EM]:!0,[Fe.EMBED]:!0,[Fe.H1]:!0,[Fe.H2]:!0,[Fe.H3]:!0,[Fe.H4]:!0,[Fe.H5]:!0,[Fe.H6]:!0,[Fe.HEAD]:!0,[Fe.HR]:!0,[Fe.I]:!0,[Fe.IMG]:!0,[Fe.LI]:!0,[Fe.LISTING]:!0,[Fe.MENU]:!0,[Fe.META]:!0,[Fe.NOBR]:!0,[Fe.OL]:!0,[Fe.P]:!0,[Fe.PRE]:!0,[Fe.RUBY]:!0,[Fe.S]:!0,[Fe.SMALL]:!0,[Fe.SPAN]:!0,[Fe.STRONG]:!0,[Fe.STRIKE]:!0,[Fe.SUB]:!0,[Fe.SUP]:!0,[Fe.TABLE]:!0,[Fe.TT]:!0,[Fe.U]:!0,[Fe.UL]:!0,[Fe.VAR]:!0};gl.causesExit=function(i){let e=i.tagName;return e===Fe.FONT&&(o3.getTokenAttr(i,y_.COLOR)!==null||o3.getTokenAttr(i,y_.SIZE)!==null||o3.getTokenAttr(i,y_.FACE)!==null)?!0:Wq[e]};gl.adjustTokenMathMLAttrs=function(i){for(let e=0;e {"use strict";var M=Q1(),Kq=CR(),tM=xR(),qq=RR(),Gq=UR(),iM=as(),$q=VR(),Yq=qR(),nM=JR(),ls=eM(),fn=n_(),Xq=i_(),Ic=Ec(),S=Ic.TAG_NAMES,Ae=Ic.NAMESPACES,mM=Ic.ATTRS,Qq={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:$q},pM="hidden",Jq=8,Zq=3,fM="INITIAL_MODE",l3="BEFORE_HTML_MODE",k_="BEFORE_HEAD_MODE",Lh="IN_HEAD_MODE",gM="IN_HEAD_NO_SCRIPT_MODE",A_="AFTER_HEAD_MODE",cs="IN_BODY_MODE",x_="TEXT_MODE",Mn="IN_TABLE_MODE",_M="IN_TABLE_TEXT_MODE",L_="IN_CAPTION_MODE",a0="IN_COLUMN_GROUP_MODE",io="IN_TABLE_BODY_MODE",da="IN_ROW_MODE",N_="IN_CELL_MODE",c3="IN_SELECT_MODE",d3="IN_SELECT_IN_TABLE_MODE",E_="IN_TEMPLATE_MODE",h3="AFTER_BODY_MODE",D_="IN_FRAMESET_MODE",vM="AFTER_FRAMESET_MODE",bM="AFTER_AFTER_BODY_MODE",yM="AFTER_AFTER_FRAMESET_MODE",eG={[S.TR]:da,[S.TBODY]:io,[S.THEAD]:io,[S.TFOOT]:io,[S.CAPTION]:L_,[S.COLGROUP]:a0,[S.TABLE]:Mn,[S.BODY]:cs,[S.FRAMESET]:D_},tG={[S.CAPTION]:Mn,[S.COLGROUP]:Mn,[S.TBODY]:Mn,[S.TFOOT]:Mn,[S.THEAD]:Mn,[S.COL]:a0,[S.TR]:io,[S.TD]:da,[S.TH]:da},rM={[fM]:{[M.CHARACTER_TOKEN]:e0,[M.NULL_CHARACTER_TOKEN]:e0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:cG,[M.START_TAG_TOKEN]:e0,[M.END_TAG_TOKEN]:e0,[M.EOF_TOKEN]:e0},[l3]:{[M.CHARACTER_TOKEN]:i0,[M.NULL_CHARACTER_TOKEN]:i0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:dG,[M.END_TAG_TOKEN]:hG,[M.EOF_TOKEN]:i0},[k_]:{[M.CHARACTER_TOKEN]:n0,[M.NULL_CHARACTER_TOKEN]:n0,[M.WHITESPACE_CHARACTER_TOKEN]:vt,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:uG,[M.END_TAG_TOKEN]:mG,[M.EOF_TOKEN]:n0},[Lh]:{[M.CHARACTER_TOKEN]:r0,[M.NULL_CHARACTER_TOKEN]:r0,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:en,[M.END_TAG_TOKEN]:kc,[M.EOF_TOKEN]:r0},[gM]:{[M.CHARACTER_TOKEN]:o0,[M.NULL_CHARACTER_TOKEN]:o0,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:pG,[M.END_TAG_TOKEN]:fG,[M.EOF_TOKEN]:o0},[A_]:{[M.CHARACTER_TOKEN]:s0,[M.NULL_CHARACTER_TOKEN]:s0,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:S_,[M.START_TAG_TOKEN]:gG,[M.END_TAG_TOKEN]:_G,[M.EOF_TOKEN]:s0},[cs]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:dr,[M.END_TAG_TOKEN]:u3,[M.EOF_TOKEN]:la},[x_]:{[M.CHARACTER_TOKEN]:cr,[M.NULL_CHARACTER_TOKEN]:cr,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:vt,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:vt,[M.END_TAG_TOKEN]:$G,[M.EOF_TOKEN]:YG},[Mn]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:m3,[M.END_TAG_TOKEN]:p3,[M.EOF_TOKEN]:la},[_M]:{[M.CHARACTER_TOKEN]:o$,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:r$,[M.COMMENT_TOKEN]:t0,[M.DOCTYPE_TOKEN]:t0,[M.START_TAG_TOKEN]:t0,[M.END_TAG_TOKEN]:t0,[M.EOF_TOKEN]:t0},[L_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:s$,[M.END_TAG_TOKEN]:a$,[M.EOF_TOKEN]:la},[a0]:{[M.CHARACTER_TOKEN]:T_,[M.NULL_CHARACTER_TOKEN]:T_,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:l$,[M.END_TAG_TOKEN]:c$,[M.EOF_TOKEN]:la},[io]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:d$,[M.END_TAG_TOKEN]:h$,[M.EOF_TOKEN]:la},[da]:{[M.CHARACTER_TOKEN]:ca,[M.NULL_CHARACTER_TOKEN]:ca,[M.WHITESPACE_CHARACTER_TOKEN]:ca,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:u$,[M.END_TAG_TOKEN]:m$,[M.EOF_TOKEN]:la},[N_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:p$,[M.END_TAG_TOKEN]:f$,[M.EOF_TOKEN]:la},[c3]:{[M.CHARACTER_TOKEN]:cr,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:SM,[M.END_TAG_TOKEN]:CM,[M.EOF_TOKEN]:la},[d3]:{[M.CHARACTER_TOKEN]:cr,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:g$,[M.END_TAG_TOKEN]:_$,[M.EOF_TOKEN]:la},[E_]:{[M.CHARACTER_TOKEN]:C_,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:v$,[M.END_TAG_TOKEN]:b$,[M.EOF_TOKEN]:wM},[h3]:{[M.CHARACTER_TOKEN]:I_,[M.NULL_CHARACTER_TOKEN]:I_,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:lG,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:y$,[M.END_TAG_TOKEN]:S$,[M.EOF_TOKEN]:Z1},[D_]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:C$,[M.END_TAG_TOKEN]:w$,[M.EOF_TOKEN]:Z1},[vM]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:cr,[M.COMMENT_TOKEN]:$i,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:x$,[M.END_TAG_TOKEN]:E$,[M.EOF_TOKEN]:Z1},[bM]:{[M.CHARACTER_TOKEN]:w_,[M.NULL_CHARACTER_TOKEN]:w_,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:oM,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:T$,[M.END_TAG_TOKEN]:w_,[M.EOF_TOKEN]:Z1},[yM]:{[M.CHARACTER_TOKEN]:vt,[M.NULL_CHARACTER_TOKEN]:vt,[M.WHITESPACE_CHARACTER_TOKEN]:Tc,[M.COMMENT_TOKEN]:oM,[M.DOCTYPE_TOKEN]:vt,[M.START_TAG_TOKEN]:I$,[M.END_TAG_TOKEN]:vt,[M.EOF_TOKEN]:Z1}},a3=class{constructor(e){this.options=Yq(Qq,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&iM.install(this,qq),this.options.onParseError&&iM.install(this,Gq,{onParseError:this.options.onParseError})}parse(e){let t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(S.TEMPLATE,Ae.HTML,[]));let n=this.treeAdapter.createElement("documentmock",Ae.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===S.TEMPLATE&&this._pushTmplInsertionMode(E_),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);let r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(e,t){this.tokenizer=new M(this.options),this.stopped=!1,this.insertionMode=fM,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new Kq(this.document,this.treeAdapter),this.activeFormattingElements=new tM(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();let t=this.tokenizer.getNextToken();if(t.type===M.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===M.WHITESPACE_CHARACTER_TOKEN&&t.chars[0]===` `)){if(t.chars.length===1)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){let n=this.pendingScript;this.pendingScript=null,t(n);return}e&&e()}_setupTokenizerCDATAMode(){let e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==Ae.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,Ae.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=x_}switchToPlaintextParsing(){this.insertionMode=x_,this.originalInsertionMode=cs,this.tokenizer.state=M.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===S.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===Ae.HTML){let e=this.treeAdapter.getTagName(this.fragmentContext);e===S.TITLE||e===S.TEXTAREA?this.tokenizer.state=M.MODE.RCDATA:e===S.STYLE||e===S.XMP||e===S.IFRAME||e===S.NOEMBED||e===S.NOFRAMES||e===S.NOSCRIPT?this.tokenizer.state=M.MODE.RAWTEXT:e===S.SCRIPT?this.tokenizer.state=M.MODE.SCRIPT_DATA:e===S.PLAINTEXT&&(this.tokenizer.state=M.MODE.PLAINTEXT)}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){let t=this.treeAdapter.createElement(e,Ae.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,Ae.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(S.HTML,Ae.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{let t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){let t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;let n=this.treeAdapter.getNamespaceURI(t);if(n===Ae.HTML||this.treeAdapter.getTagName(t)===S.ANNOTATION_XML&&n===Ae.MATHML&&e.type===M.START_TAG_TOKEN&&e.tagName===S.SVG)return!1;let r=e.type===M.CHARACTER_TOKEN||e.type===M.NULL_CHARACTER_TOKEN||e.type===M.WHITESPACE_CHARACTER_TOKEN;return(e.type===M.START_TAG_TOKEN&&e.tagName!==S.MGLYPH&&e.tagName!==S.MALIGNMARK||r)&&this._isIntegrationPoint(t,Ae.MATHML)||(e.type===M.START_TAG_TOKEN||r)&&this._isIntegrationPoint(t,Ae.HTML)?!1:e.type!==M.EOF_TOKEN}_processToken(e){rM[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){rM[cs][e.type](this,e)}_processTokenInForeignContent(e){e.type===M.CHARACTER_TOKEN?A$(this,e):e.type===M.NULL_CHARACTER_TOKEN?k$(this,e):e.type===M.WHITESPACE_CHARACTER_TOKEN?cr(this,e):e.type===M.COMMENT_TOKEN?$i(this,e):e.type===M.START_TAG_TOKEN?L$(this,e):e.type===M.END_TAG_TOKEN&&N$(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===M.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(fn.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){let n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),o=this.treeAdapter.getAttrList(e);return ls.isIntegrationPoint(n,r,o,t)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.length;if(e){let t=e,n=null;do if(t--,n=this.activeFormattingElements.entries[t],n.type===tM.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}while(t>0);for(let r=t;r =0;e--){let n=this.openElements.items[e];e===0&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));let r=this.treeAdapter.getTagName(n),o=eG[r];if(o){this.insertionMode=o;break}else if(!t&&(r===S.TD||r===S.TH)){this.insertionMode=N_;break}else if(!t&&r===S.HEAD){this.insertionMode=Lh;break}else if(r===S.SELECT){this._resetInsertionModeForSelect(e);break}else if(r===S.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(r===S.HTML){this.insertionMode=this.headElement?A_:k_;break}else if(t){this.insertionMode=cs;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===S.TEMPLATE)break;if(r===S.TABLE){this.insertionMode=d3;return}}this.insertionMode=c3}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){let t=this.treeAdapter.getTagName(e);return t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){let e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){let n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===S.TEMPLATE&&o===Ae.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}else if(r===S.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){let t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return Ic.SPECIAL_ELEMENTS[n][t]}};xM.exports=a3;function iG(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagName)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):Co(i,e),t}function nG(i,e){let t=null;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n];if(r===e.element)break;i._isSpecialElement(r)&&(t=r)}return t||(i.openElements.popUntilElementPopped(e.element),i.activeFormattingElements.removeEntry(e)),t}function rG(i,e,t){let n=e,r=i.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==t;o++,s=r){r=i.openElements.getCommonAncestor(s);let a=i.activeFormattingElements.getElementEntry(s),l=a&&o>=Zq;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(s)):(s=oG(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(s,n),n=s)}return n}function oG(i,e){let t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function sG(i,e,t){if(i._isElementCausesFosterParenting(e))i._fosterParentElement(t);else{let n=i.treeAdapter.getTagName(e),r=i.treeAdapter.getNamespaceURI(e);n===S.TEMPLATE&&r===Ae.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function aG(i,e,t){let n=i.treeAdapter.getNamespaceURI(t.element),r=t.token,o=i.treeAdapter.createElement(r.tagName,n,r.attrs);i._adoptNodes(e,o),i.treeAdapter.appendChild(e,o),i.activeFormattingElements.insertElementAfterBookmark(o,t.token),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,o)}function vl(i,e){let t;for(let n=0;n 0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagName!==S.TEMPLATE&&i._err(fn.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(S.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode()):i._err(fn.endTagWithoutMatchingOpenElement)}function r0(i,e){i.openElements.pop(),i.insertionMode=A_,i._processToken(e)}function pG(i,e){let t=e.tagName;t===S.HTML?dr(i,e):t===S.BASEFONT||t===S.BGSOUND||t===S.HEAD||t===S.LINK||t===S.META||t===S.NOFRAMES||t===S.STYLE?en(i,e):t===S.NOSCRIPT?i._err(fn.nestedNoscriptInHead):o0(i,e)}function fG(i,e){let t=e.tagName;t===S.NOSCRIPT?(i.openElements.pop(),i.insertionMode=Lh):t===S.BR?o0(i,e):i._err(fn.endTagWithoutMatchingOpenElement)}function o0(i,e){let t=e.type===M.EOF_TOKEN?fn.openElementsLeftAfterEof:fn.disallowedContentInNoscriptInHead;i._err(t),i.openElements.pop(),i.insertionMode=Lh,i._processToken(e)}function gG(i,e){let t=e.tagName;t===S.HTML?dr(i,e):t===S.BODY?(i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode=cs):t===S.FRAMESET?(i._insertElement(e,Ae.HTML),i.insertionMode=D_):t===S.BASE||t===S.BASEFONT||t===S.BGSOUND||t===S.LINK||t===S.META||t===S.NOFRAMES||t===S.SCRIPT||t===S.STYLE||t===S.TEMPLATE||t===S.TITLE?(i._err(fn.abandonedHeadElementChild),i.openElements.push(i.headElement),en(i,e),i.openElements.remove(i.headElement)):t===S.HEAD?i._err(fn.misplacedStartTagForHeadElement):s0(i,e)}function _G(i,e){let t=e.tagName;t===S.BODY||t===S.HTML||t===S.BR?s0(i,e):t===S.TEMPLATE?kc(i,e):i._err(fn.endTagWithoutMatchingOpenElement)}function s0(i,e){i._insertFakeElement(S.BODY),i.insertionMode=cs,i._processToken(e)}function Tc(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function C_(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function vG(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function bG(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function yG(i,e){let t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,Ae.HTML),i.insertionMode=D_)}function aa(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function SG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement();let t=i.openElements.currentTagName;(t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6)&&i.openElements.pop(),i._insertElement(e,Ae.HTML)}function sM(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function CG(i,e){let t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),t||(i.formElement=i.openElements.current))}function wG(i,e){i.framesetOk=!1;let t=e.tagName;for(let n=i.openElements.stackTop;n>=0;n--){let r=i.openElements.items[n],o=i.treeAdapter.getTagName(r),s=null;if(t===S.LI&&o===S.LI?s=S.LI:(t===S.DD||t===S.DT)&&(o===S.DD||o===S.DT)&&(s=o),s){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(o!==S.ADDRESS&&o!==S.DIV&&o!==S.P&&i._isSpecialElement(r))break}i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function xG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.tokenizer.state=M.MODE.PLAINTEXT}function EG(i,e){i.openElements.hasInScope(S.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(S.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.framesetOk=!1}function TG(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);t&&(vl(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function kh(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function IG(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(S.NOBR)&&(vl(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,Ae.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function aM(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function kG(i,e){i.treeAdapter.getDocumentMode(i.document)!==Ic.DOCUMENT_MODE.QUIRKS&&i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode=Mn}function Ah(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,Ae.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function AG(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,Ae.HTML);let t=M.getTokenAttr(e,mM.TYPE);(!t||t.toLowerCase()!==pM)&&(i.framesetOk=!1),e.ackSelfClosing=!0}function lM(i,e){i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0}function LG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._appendElement(e,Ae.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function NG(i,e){e.tagName=S.IMG,Ah(i,e)}function DG(i,e){i._insertElement(e,Ae.HTML),i.skipNextNewLine=!0,i.tokenizer.state=M.MODE.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=x_}function RG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,M.MODE.RAWTEXT)}function MG(i,e){i.framesetOk=!1,i._switchToTextParsing(e,M.MODE.RAWTEXT)}function cM(i,e){i._switchToTextParsing(e,M.MODE.RAWTEXT)}function OG(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML),i.framesetOk=!1,i.insertionMode===Mn||i.insertionMode===L_||i.insertionMode===io||i.insertionMode===da||i.insertionMode===N_?i.insertionMode=d3:i.insertionMode=c3}function dM(i,e){i.openElements.currentTagName===S.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML)}function hM(i,e){i.openElements.hasInScope(S.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,Ae.HTML)}function PG(i,e){i.openElements.hasInScope(S.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(S.RTC),i._insertElement(e,Ae.HTML)}function FG(i,e){i.openElements.hasInButtonScope(S.P)&&i._closePElement(),i._insertElement(e,Ae.HTML)}function HG(i,e){i._reconstructActiveFormattingElements(),ls.adjustTokenMathMLAttrs(e),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,Ae.MATHML):i._insertElement(e,Ae.MATHML),e.ackSelfClosing=!0}function BG(i,e){i._reconstructActiveFormattingElements(),ls.adjustTokenSVGAttrs(e),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,Ae.SVG):i._insertElement(e,Ae.SVG),e.ackSelfClosing=!0}function eo(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,Ae.HTML)}function dr(i,e){let t=e.tagName;switch(t.length){case 1:t===S.I||t===S.S||t===S.B||t===S.U?kh(i,e):t===S.P?aa(i,e):t===S.A?TG(i,e):eo(i,e);break;case 2:t===S.DL||t===S.OL||t===S.UL?aa(i,e):t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6?SG(i,e):t===S.LI||t===S.DD||t===S.DT?wG(i,e):t===S.EM||t===S.TT?kh(i,e):t===S.BR?Ah(i,e):t===S.HR?LG(i,e):t===S.RB?hM(i,e):t===S.RT||t===S.RP?PG(i,e):t!==S.TH&&t!==S.TD&&t!==S.TR&&eo(i,e);break;case 3:t===S.DIV||t===S.DIR||t===S.NAV?aa(i,e):t===S.PRE?sM(i,e):t===S.BIG?kh(i,e):t===S.IMG||t===S.WBR?Ah(i,e):t===S.XMP?RG(i,e):t===S.SVG?BG(i,e):t===S.RTC?hM(i,e):t!==S.COL&&eo(i,e);break;case 4:t===S.HTML?vG(i,e):t===S.BASE||t===S.LINK||t===S.META?en(i,e):t===S.BODY?bG(i,e):t===S.MAIN||t===S.MENU?aa(i,e):t===S.FORM?CG(i,e):t===S.CODE||t===S.FONT?kh(i,e):t===S.NOBR?IG(i,e):t===S.AREA?Ah(i,e):t===S.MATH?HG(i,e):t===S.MENU?FG(i,e):t!==S.HEAD&&eo(i,e);break;case 5:t===S.STYLE||t===S.TITLE?en(i,e):t===S.ASIDE?aa(i,e):t===S.SMALL?kh(i,e):t===S.TABLE?kG(i,e):t===S.EMBED?Ah(i,e):t===S.INPUT?AG(i,e):t===S.PARAM||t===S.TRACK?lM(i,e):t===S.IMAGE?NG(i,e):t!==S.FRAME&&t!==S.TBODY&&t!==S.TFOOT&&t!==S.THEAD&&eo(i,e);break;case 6:t===S.SCRIPT?en(i,e):t===S.CENTER||t===S.FIGURE||t===S.FOOTER||t===S.HEADER||t===S.HGROUP||t===S.DIALOG?aa(i,e):t===S.BUTTON?EG(i,e):t===S.STRIKE||t===S.STRONG?kh(i,e):t===S.APPLET||t===S.OBJECT?aM(i,e):t===S.KEYGEN?Ah(i,e):t===S.SOURCE?lM(i,e):t===S.IFRAME?MG(i,e):t===S.SELECT?OG(i,e):t===S.OPTION?dM(i,e):eo(i,e);break;case 7:t===S.BGSOUND?en(i,e):t===S.DETAILS||t===S.ADDRESS||t===S.ARTICLE||t===S.SECTION||t===S.SUMMARY?aa(i,e):t===S.LISTING?sM(i,e):t===S.MARQUEE?aM(i,e):t===S.NOEMBED?cM(i,e):t!==S.CAPTION&&eo(i,e);break;case 8:t===S.BASEFONT?en(i,e):t===S.FRAMESET?yG(i,e):t===S.FIELDSET?aa(i,e):t===S.TEXTAREA?DG(i,e):t===S.TEMPLATE?en(i,e):t===S.NOSCRIPT?i.options.scriptingEnabled?cM(i,e):eo(i,e):t===S.OPTGROUP?dM(i,e):t!==S.COLGROUP&&eo(i,e);break;case 9:t===S.PLAINTEXT?xG(i,e):eo(i,e);break;case 10:t===S.BLOCKQUOTE||t===S.FIGCAPTION?aa(i,e):eo(i,e);break;default:eo(i,e)}}function zG(i){i.openElements.hasInScope(S.BODY)&&(i.insertionMode=h3)}function UG(i,e){i.openElements.hasInScope(S.BODY)&&(i.insertionMode=h3,i._processToken(e))}function _l(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function WG(i){let e=i.openElements.tmplCount>0,t=i.formElement;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(S.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(S.FORM):i.openElements.remove(t))}function jG(i){i.openElements.hasInButtonScope(S.P)||i._insertFakeElement(S.P),i._closePElement()}function VG(i){i.openElements.hasInListItemScope(S.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(S.LI),i.openElements.popUntilTagNamePopped(S.LI))}function KG(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function qG(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function uM(i,e){let t=e.tagName;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function GG(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(S.BR),i.openElements.pop(),i.framesetOk=!1}function Co(i,e){let t=e.tagName;for(let n=i.openElements.stackTop;n>0;n--){let r=i.openElements.items[n];if(i.treeAdapter.getTagName(r)===t){i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilElementPopped(r);break}if(i._isSpecialElement(r))break}}function u3(i,e){let t=e.tagName;switch(t.length){case 1:t===S.A||t===S.B||t===S.I||t===S.S||t===S.U?vl(i,e):t===S.P?jG(i,e):Co(i,e);break;case 2:t===S.DL||t===S.UL||t===S.OL?_l(i,e):t===S.LI?VG(i,e):t===S.DD||t===S.DT?KG(i,e):t===S.H1||t===S.H2||t===S.H3||t===S.H4||t===S.H5||t===S.H6?qG(i,e):t===S.BR?GG(i,e):t===S.EM||t===S.TT?vl(i,e):Co(i,e);break;case 3:t===S.BIG?vl(i,e):t===S.DIR||t===S.DIV||t===S.NAV||t===S.PRE?_l(i,e):Co(i,e);break;case 4:t===S.BODY?zG(i,e):t===S.HTML?UG(i,e):t===S.FORM?WG(i,e):t===S.CODE||t===S.FONT||t===S.NOBR?vl(i,e):t===S.MAIN||t===S.MENU?_l(i,e):Co(i,e);break;case 5:t===S.ASIDE?_l(i,e):t===S.SMALL?vl(i,e):Co(i,e);break;case 6:t===S.CENTER||t===S.FIGURE||t===S.FOOTER||t===S.HEADER||t===S.HGROUP||t===S.DIALOG?_l(i,e):t===S.APPLET||t===S.OBJECT?uM(i,e):t===S.STRIKE||t===S.STRONG?vl(i,e):Co(i,e);break;case 7:t===S.ADDRESS||t===S.ARTICLE||t===S.DETAILS||t===S.SECTION||t===S.SUMMARY||t===S.LISTING?_l(i,e):t===S.MARQUEE?uM(i,e):Co(i,e);break;case 8:t===S.FIELDSET?_l(i,e):t===S.TEMPLATE?kc(i,e):Co(i,e);break;case 10:t===S.BLOCKQUOTE||t===S.FIGCAPTION?_l(i,e):Co(i,e);break;default:Co(i,e)}}function la(i,e){i.tmplInsertionModeStackTop>-1?wM(i,e):i.stopped=!0}function $G(i,e){e.tagName===S.SCRIPT&&(i.pendingScript=i.openElements.current),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function YG(i,e){i._err(fn.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i._processToken(e)}function ca(i,e){let t=i.openElements.currentTagName;t===S.TABLE||t===S.TBODY||t===S.TFOOT||t===S.THEAD||t===S.TR?(i.pendingCharacterTokens=[],i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=_M,i._processToken(e)):to(i,e)}function XG(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,Ae.HTML),i.insertionMode=L_}function QG(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,Ae.HTML),i.insertionMode=a0}function JG(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(S.COLGROUP),i.insertionMode=a0,i._processToken(e)}function ZG(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,Ae.HTML),i.insertionMode=io}function e$(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(S.TBODY),i.insertionMode=io,i._processToken(e)}function t$(i,e){i.openElements.hasInTableScope(S.TABLE)&&(i.openElements.popUntilTagNamePopped(S.TABLE),i._resetInsertionMode(),i._processToken(e))}function i$(i,e){let t=M.getTokenAttr(e,mM.TYPE);t&&t.toLowerCase()===pM?i._appendElement(e,Ae.HTML):to(i,e),e.ackSelfClosing=!0}function n$(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,Ae.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function m3(i,e){let t=e.tagName;switch(t.length){case 2:t===S.TD||t===S.TH||t===S.TR?e$(i,e):to(i,e);break;case 3:t===S.COL?JG(i,e):to(i,e);break;case 4:t===S.FORM?n$(i,e):to(i,e);break;case 5:t===S.TABLE?t$(i,e):t===S.STYLE?en(i,e):t===S.TBODY||t===S.TFOOT||t===S.THEAD?ZG(i,e):t===S.INPUT?i$(i,e):to(i,e);break;case 6:t===S.SCRIPT?en(i,e):to(i,e);break;case 7:t===S.CAPTION?XG(i,e):to(i,e);break;case 8:t===S.COLGROUP?QG(i,e):t===S.TEMPLATE?en(i,e):to(i,e);break;default:to(i,e)}}function p3(i,e){let t=e.tagName;t===S.TABLE?i.openElements.hasInTableScope(S.TABLE)&&(i.openElements.popUntilTagNamePopped(S.TABLE),i._resetInsertionMode()):t===S.TEMPLATE?kc(i,e):t!==S.BODY&&t!==S.CAPTION&&t!==S.COL&&t!==S.COLGROUP&&t!==S.HTML&&t!==S.TBODY&&t!==S.TD&&t!==S.TFOOT&&t!==S.TH&&t!==S.THEAD&&t!==S.TR&&to(i,e)}function to(i,e){let t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,i._processTokenInBodyMode(e),i.fosterParentingEnabled=t}function r$(i,e){i.pendingCharacterTokens.push(e)}function o$(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function t0(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t 0?(i.openElements.popUntilTagNamePopped(S.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i._popTmplInsertionMode(),i._resetInsertionMode(),i._processToken(e)):i.stopped=!0}function y$(i,e){e.tagName===S.HTML?dr(i,e):I_(i,e)}function S$(i,e){e.tagName===S.HTML?i.fragmentContext||(i.insertionMode=bM):I_(i,e)}function I_(i,e){i.insertionMode=cs,i._processToken(e)}function C$(i,e){let t=e.tagName;t===S.HTML?dr(i,e):t===S.FRAMESET?i._insertElement(e,Ae.HTML):t===S.FRAME?(i._appendElement(e,Ae.HTML),e.ackSelfClosing=!0):t===S.NOFRAMES&&en(i,e)}function w$(i,e){e.tagName===S.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagName!==S.FRAMESET&&(i.insertionMode=vM))}function x$(i,e){let t=e.tagName;t===S.HTML?dr(i,e):t===S.NOFRAMES&&en(i,e)}function E$(i,e){e.tagName===S.HTML&&(i.insertionMode=yM)}function T$(i,e){e.tagName===S.HTML?dr(i,e):w_(i,e)}function w_(i,e){i.insertionMode=cs,i._processToken(e)}function I$(i,e){let t=e.tagName;t===S.HTML?dr(i,e):t===S.NOFRAMES&&en(i,e)}function k$(i,e){e.chars=Xq.REPLACEMENT_CHARACTER,i._insertCharacters(e)}function A$(i,e){i._insertCharacters(e),i.framesetOk=!1}function L$(i,e){if(ls.causesExit(e)&&!i.fragmentContext){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==Ae.HTML&&!i._isIntegrationPoint(i.openElements.current);)i.openElements.pop();i._processToken(e)}else{let t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===Ae.MATHML?ls.adjustTokenMathMLAttrs(e):n===Ae.SVG&&(ls.adjustTokenSVGTagName(e),ls.adjustTokenSVGAttrs(e)),ls.adjustTokenXMLAttrs(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function N$(i,e){for(let t=i.openElements.stackTop;t>0;t--){let n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===Ae.HTML){i._processToken(e);break}if(i.treeAdapter.getTagName(n).toLowerCase()===e.tagName){i.openElements.popUntilElementPopped(n);break}}}});var jM=lt((Z0e,WM)=>{var HM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,X$=/\n/g,Q$=/^\s*/,J$=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Z$=/^:\s*/,eY=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tY=/^[;\s]*/,iY=/^\s+|\s+$/g,nY=` -`,BM="/",zM="*",Nc="",rY="comment",oY="declaration";WM.exports=function(i,e){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];e=e||{};var t=1,n=1;function r(f){var _=f.match(X$);_&&(t+=_.length);var b=f.lastIndexOf(nY);n=~b?f.length-b:n+f.length}function o(){var f={line:t,column:n};return function(_){return _.position=new s(f),d(),_}}function s(f){this.start=f,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(f){var _=new Error(e.source+":"+t+":"+n+": "+f);if(_.reason=f,_.filename=e.source,_.line=t,_.column=n,_.source=i,e.silent)a.push(_);else throw _}function c(f){var _=f.exec(i);if(_){var b=_[0];return r(b),i=i.slice(b.length),_}}function d(){c(Q$)}function h(f){var _;for(f=f||[];_=u();)_!==!1&&f.push(_);return f}function u(){var f=o();if(!(BM!=i.charAt(0)||zM!=i.charAt(1))){for(var _=2;Nc!=i.charAt(_)&&(zM!=i.charAt(_)||BM!=i.charAt(_+1));)++_;if(_+=2,Nc===i.charAt(_-1))return l("End of comment missing");var b=i.slice(2,_-2);return n+=2,r(b),i=i.slice(_),n+=2,f({type:rY,comment:b})}}function m(){var f=o(),_=c(J$);if(_){if(u(),!c(Z$))return l("property missing ':'");var b=c(eY),C=f({type:oY,property:UM(_[0].replace(HM,Nc)),value:b?UM(b[0].replace(HM,Nc)):Nc});return c(tY),C}}function p(){var f=[];h(f);for(var _;_=m();)_!==!1&&(f.push(_),h(f));return f}return d(),p()};function UM(i){return i?i.replace(iY,Nc):Nc}});var KM=lt((eme,VM)=>{var sY=jM();function aY(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=sY(i),o=typeof e=="function",s,a,l=0,c=r.length;l {Dt();Gt();it();Bs();re();Me();En();V2();Ie();ht();Qf();ut();dj();cj();be();Ci();qe();st();mc();var iH=Qc&&Qc.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c4=Qc&&Qc.__param||function(i,e){return function(t,n){e(t,n,i)}},s8=Qc&&Qc.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},G0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new W,this._sessionDisposables=new W,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new oc;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new qt,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a {r.token.isCancellationRequested||Xt(s)&&(Uk.execute(this._editor,s,!0),Wk(s))}).finally(()=>{o.dispose()})}};G0.ID="editor.contrib.autoFormat";G0=iH([c4(1,le),c4(2,Xs)],G0);var $0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new W,this._callOnModel=new W,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(u9,this.editor,e,2,Qo.None,ze.None).catch(Be))}};$0.ID="editor.contrib.formatOnPaste";$0=iH([c4(1,le),c4(2,Ce)],$0);var r8=class extends K{constructor(){super({id:"editor.action.formatDocument",label:g("formatDocument.label","Format Document"),alias:"Format Document",precondition:G.and(I.notInCompositeEditor,I.writable,I.hasDocumentFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return s8(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(Ce);yield e.get(Gs).showWhile(n.invokeFunction(jk,t,1,Qo.None,ze.None),250)}})}},o8=class extends K{constructor(){super({id:"editor.action.formatSelection",label:g("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:G.and(I.writable,I.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2084),weight:100},contextMenuOpts:{when:I.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return s8(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(Ce),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(Gs).showWhile(n.invokeFunction(u9,t,o,1,Qo.None,ze.None),250)})}};Se(G0.ID,G0,2);Se($0.ID,$0,2);F(r8);F(o8);Je.registerCommand("editor.action.format",i=>s8(void 0,void 0,void 0,function*(){let e=i.get(_t).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(Pt);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var $5,IB=Ka(()=>{Mi();$5=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new ye(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new ye(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var kB=Ka(()=>{});var AB=Ka(()=>{kB()});var LB=lt(jm=>{ct();it();g1();Me();Ie();Mi();ht();hn();Qf();be();IB();AB();var zte=jm&&jm.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ute=jm&&jm.__param||function(i,e){return function(t,n){e(t,n,i)}},Hl=class aw{static get(e){return e.getContribution(aw.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new jf(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Ht(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let h=k.lift(c.range),u=c.range,m=c.value.length-(s.endColumn-s.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+c.value.length},m>1&&(s=new ye(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+m-1));let p=new $5(h,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,p),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:aw.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=$d(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Be)}).catch(Be)):Promise.resolve(void 0)}};Hl.ID="editor.contrib.inPlaceReplaceController";Hl.DECORATION=Ue.register({description:"in-place-replace",className:"valueSetReplacement"});Hl=zte([Ute(1,Xs)],Hl);var lw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.up",label:g("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},cw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.down",label:g("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Se(Hl.ID,Hl,4);F(lw);F(cw)});var mz=Ka(()=>{});var pz=Ka(()=>{mz()});var Ed,fz=Ka(()=>{wr();hj();be();mi();qe();Ed=class i extends Gr{constructor(){super({id:i.ID,title:{value:g({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(we).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!p9.getTabFocusMode(t);p9.setTabFocusMode(r,t),r?Kt(g("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Kt(g("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Ed.ID="editor.action.toggleTabFocusMode";Ft(Ed)});var bz=lt(gp=>{pz();gt();lj();wr();Kf();re();Sn();Bt();wn();Me();ht();fz();qe();st();un();Xr();ch();var gz=gp&&gp.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ob=gp&&gp.__param||function(i,e){return function(t,n){e(t,n,i)}},_z=new Ne("accessibilityHelpWidgetVisible",!1),Td=class vz extends Y{static get(e){return e.getContribution(vz.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Ru,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};Td.ID="editor.contrib.accessibilityHelpController";Td=gz([Ob(1,Ce)],Td);function qie(i,e){return!i||i.length===0?oi.noSelection:i.length===1?e?xr(oi.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):xr(oi.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?xr(oi.multiSelectionRange,i.length,e):i.length>0?xr(oi.multiSelection,i.length):""}var Ru=class Pb extends $s{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=_z.bindTo(this._contextKeyService),this._domNode=t9(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-modal","true"),this._domNode.setAttribute("aria-hidden","true");let o=oe(this._domNode.domNode,te("h1",void 0,oi.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=t9(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(Vr(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Kt(oi.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),rn(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Kt(oi.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(Qe.parse(a)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Pb.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let r=this._keybindingService.lookupKeybinding(e);return r?xr(t,r.getAriaLabel()):xr(n,e)}_buildContent(){let e=this._contentDomNode.domNode,t=this._editor.getOptions(),n=this._editor.getSelections(),r=0;if(n){let c=this._editor.getModel();c&&n.forEach(d=>{r+=c.getValueLengthInRange(d)})}oe(e,te("p",void 0,qie(n,r)));let o=oe(e,te("p"));t.get(59)?t.get(88)?o.textContent=oi.readonlyDiffEditor:o.textContent=oi.editableDiffEditor:t.get(88)?o.textContent=oi.readonlyEditor:o.textContent=oi.editableEditor;let s=oe(e,te("ul")),a=Wi?oi.changeConfigToOnMac:oi.changeConfigToOnWinLinux;switch(t.get(2)){case 0:oe(s,te("li",void 0,a));break;case 2:oe(s,te("li",void 0,oi.auto_on));break;case 1:oe(s,te("li",void 0,oi.auto_off,a));break}t.get(139)?oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,oi.tabFocusModeOnMsg,oi.tabFocusModeOnMsgNoKb))):oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,oi.tabFocusModeOffMsg,oi.tabFocusModeOffMsgNoKb)));let l=Wi?oi.openDocMac:oi.openDocWinLinux;oe(s,te("li",void 0,l)),oe(e,te("p",void 0,oi.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,rn(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(Pb.WIDTH,e.width-40)),n=Math.max(5,Math.min(Pb.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(n);let r=Math.round((e.height-n)/2);this._domNode.setTop(r);let o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};Ru.ID="editor.contrib.accessibilityHelpWidget";Ru.WIDTH=500;Ru.HEIGHT=300;Ru=gz([Ob(1,we),Ob(2,mt),Ob(3,di)],Ru);var gx=class extends K{constructor(){super({id:"editor.action.showAccessibilityHelp",label:oi.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=Td.get(t);n==null||n.show()}};Se(Td.ID,Td,4);F(gx);var Gie=ni.bindToContribution(Td.get);ge(new Gie({id:"closeAccessibilityHelp",precondition:_z,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:I.focus,primary:9,secondary:[1033]}}))});var yz=Ka(()=>{});var Sz=Ka(()=>{yz()});var xz=lt(_p=>{Sz();gt();Xd();re();Me();dn();ZW();oj();$r();uj();ch();var $ie=_p&&_p.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Cz=_p&&_p.__param||function(i,e){return function(t,n){e(t,n,i)}},Mu=class wz extends Y{static get(e){return e.getContribution(wz.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(ih.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Fb(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mu.ID="editor.contrib.inspectTokens";Mu=$ie([Cz(1,lA),Cz(2,ci)],Mu);var _x=class extends K{constructor(){super({id:"editor.action.inspectTokens",label:sA.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Mu.get(t);n==null||n.launch()}};function Yie(i){let e="";for(let t=0,n=i.length;t lk,tokenize:(r,o,s)=>ck(e,s),tokenizeEncoded:(r,o,s)=>dk(n,s)}}var Fb=class i extends Y{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=Xie(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n {(function(i){if(typeof EW=="object"&&typeof KE!="undefined")KE.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,h){if(!o[d]){if(!r[d]){var u=typeof Xl=="function"&&Xl;if(!h&&u)return u(d,!0);if(l)return l(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var p=o[d]={exports:{}};r[d][0].call(p.exports,function(f){var _=r[d][1][f];return a(_||f)},p,p.exports,n,r,o,s)}return o[d].exports}for(var l=typeof Xl=="function"&&Xl,c=0;c _._averageHeight){var R=_._renderChunk();_._lastRepaint=w,R!==!1&&typeof b.afterRender=="function"&&b.afterRender()}}};C()}return s(m,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(f,_){var b;if(Object.assign(this._config,c,_),!f||f.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=f;var C=this._config,T=this._scroller||C.scroller||document.createElement(C.scrollerTagName||"tr");if(typeof C.useFragment!="boolean"&&(this._config.useFragment=!0),!C.generate)throw new Error("Missing required `generate` function");if(!d(C.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(C.itemHeight)&&!d(C.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(C.itemHeight)?this._itemHeights=Array(C.total).fill(C.itemHeight):this._itemHeights=C.itemHeight,Object.keys(c).filter(function(B){return B in C}).forEach(function(B){var Z=C[B],ee=d(Z);if(Z&&typeof Z!="string"&&typeof Z!="number"){var V="Invalid optional `"+B+"`, expected string or number";throw new Error(V)}else ee&&(C[B]=Z+"px")});var w=!!C.horizontal,A=C[w?"width":"height"];if(A){var O=d(A),R=O?!1:A.slice(-1)==="%",j=O?A:parseInt(A.replace(/px|%/,""),10),q=window[w?"innerWidth":"innerHeight"];R?this._containerSize=q*j/100:this._containerSize=d(A)?A:j}var _e=C.scrollContainer,J=C.itemHeight*C.total,ke=this._maxElementHeight;J>ke&&console.warn(["HyperList: The maximum element height",ke+"px has","been exceeded; please reduce your item height."].join(" "));var Oe={width:""+C.width,height:_e?J+"px":""+C.height,overflow:_e?"none":"auto",position:"relative"};m.mergeStyle(f,Oe),_e&&m.mergeStyle(C.scrollContainer,{overflow:"auto"});var Pe=(b={opacity:"0",position:"absolute"},a(b,w?"height":"width","1px"),a(b,w?"width":"height",J+"px"),b);m.mergeStyle(T,Pe),this._scroller||f.appendChild(T);var et=this._computeScrollPadding();this._scrollPaddingBottom=et.bottom,this._scrollPaddingTop=et.top,this._scroller=T,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(C.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof C.afterRender=="function"&&C.afterRender()}},{key:"_getRow",value:function(f){var _=this._config,b=_.generate(f),C=b.height;if(C!==void 0&&d(C)?(b=b.element,C!==this._itemHeights[f]&&(this._itemHeights[f]=C,this._computePositions(f),this._scrollHeight=this._computeScrollHeight(f))):C=this._itemHeights[f],!b||b.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+f);h(b,_.rowClassName||"vrow");var T=this._itemPositions[f]+this._scrollPaddingTop;return m.mergeStyle(b,a({position:"absolute"},_.horizontal?"left":"top",T+"px")),b}},{key:"_getScrollPosition",value:function(){var f=this._config;return typeof f.overrideScrollPosition=="function"?f.overrideScrollPosition():this._element[f.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(f){var _=this._config,b=this._element,C=this._getScrollPosition(),T=_.total,w=_.reverse?this._getReverseFrom(C):this._getFrom(C)-1;if((w<0||w-this._screenItemsLen<0)&&(w=0),!f&&this._lastFrom===w)return!1;this._lastFrom=w;var A=w+this._cachedItemsLen;(A>T||A+this._cachedItemsLen>T)&&(A=T);var O=_.useFragment?document.createDocumentFragment():[],R=this._scroller;O[_.useFragment?"appendChild":"push"](R);for(var j=w;j0&&arguments[0]!==void 0?arguments[0]:1,_=this._config,b=_.total,C=_.reverse;f<1&&!C&&(f=1);for(var T=f;T0&&this._itemPositions[_] {(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var h=n.getContext("2d");h.shadowBlur=c.shadowBlur,h.shadowColor=c.shadowColor;var u,m=h.createLinearGradient(0,0,n.width,0);for(u in c.barColors)m.addColorStop(u,c.barColors[u]);h.lineWidth=c.barThickness,h.beginPath(),h.moveTo(0,c.barThickness/2),h.lineTo(Math.ceil(r*n.width),c.barThickness/2),h.strokeStyle=m,h.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(h){for(var u in h)c.hasOwnProperty(u)&&(c[u]=h[u])},show:function(h){var u,m;o||(h?l=l||setTimeout(()=>d.show(),h):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((m=(n=e.createElement("canvas")).style).position="fixed",m.top=m.left=m.right=m.margin=m.padding=0,m.zIndex=100001,m.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),u="resize",h=t,(m=i).addEventListener?m.addEventListener(u,h,!1):m.attachEvent?m.attachEvent("on"+u,h):m["on"+u]=h),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function p(){s=i.requestAnimationFrame(p),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(h){return h===void 0||(typeof h=="string"&&(h=(0<=h.indexOf("+")||0<=h.indexOf("-")?r:0)+parseFloat(h)),r=1 typeof i=="function"?i:function(){return i},mj=typeof self!="undefined"?self:null,x1=typeof window!="undefined"?window:null,T1=mj||x1||T1,pj="2.0.0",ts={connecting:0,open:1,closing:2,closed:3},fj=1e4,gj=1e3,Lr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Zs={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},T9={longpoll:"longpoll",websocket:"websocket"},_j={complete:4},cg=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},cA=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},vj=class{constructor(i,e,t){this.state=Lr.closed,this.topic=i,this.params=E1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new cg(this,Zs.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cA(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Lr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Lr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new cg(this,Zs.leave,E1({}),this.timeout).send(),this.state=Lr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Zs.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Zs.close,i)}onError(i){return this.on(Zs.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new cg(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Lr.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Zs.close,"leave")},t=new cg(this,Zs.leave,E1({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Lr.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s {let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===_j.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},E9=class{constructor(i){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ts.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+T9.websocket),"$1/"+T9.longpoll)}endpointURL(){return hg.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=ts.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ts.open||this.readyState===ts.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ts.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(` +`,BM="/",zM="*",Nc="",rY="comment",oY="declaration";WM.exports=function(i,e){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];e=e||{};var t=1,n=1;function r(f){var _=f.match(X$);_&&(t+=_.length);var b=f.lastIndexOf(nY);n=~b?f.length-b:n+f.length}function o(){var f={line:t,column:n};return function(_){return _.position=new s(f),d(),_}}function s(f){this.start=f,this.end={line:t,column:n},this.source=e.source}s.prototype.content=i;var a=[];function l(f){var _=new Error(e.source+":"+t+":"+n+": "+f);if(_.reason=f,_.filename=e.source,_.line=t,_.column=n,_.source=i,e.silent)a.push(_);else throw _}function c(f){var _=f.exec(i);if(_){var b=_[0];return r(b),i=i.slice(b.length),_}}function d(){c(Q$)}function h(f){var _;for(f=f||[];_=u();)_!==!1&&f.push(_);return f}function u(){var f=o();if(!(BM!=i.charAt(0)||zM!=i.charAt(1))){for(var _=2;Nc!=i.charAt(_)&&(zM!=i.charAt(_)||BM!=i.charAt(_+1));)++_;if(_+=2,Nc===i.charAt(_-1))return l("End of comment missing");var b=i.slice(2,_-2);return n+=2,r(b),i=i.slice(_),n+=2,f({type:rY,comment:b})}}function m(){var f=o(),_=c(J$);if(_){if(u(),!c(Z$))return l("property missing ':'");var b=c(eY),C=f({type:oY,property:UM(_[0].replace(HM,Nc)),value:b?UM(b[0].replace(HM,Nc)):Nc});return c(tY),C}}function p(){var f=[];h(f);for(var _;_=m();)_!==!1&&(f.push(_),h(f));return f}return d(),p()};function UM(i){return i?i.replace(iY,Nc):Nc}});var KM=lt((eme,VM)=>{var sY=jM();function aY(i,e){var t=null;if(!i||typeof i!="string")return t;for(var n,r=sY(i),o=typeof e=="function",s,a,l=0,c=r.length;l {Dt();Gt();it();Bs();re();Me();En();V2();Ie();ht();Qf();ut();dj();cj();be();Ci();qe();st();mc();var iH=Qc&&Qc.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c4=Qc&&Qc.__param||function(i,e){return function(t,n){e(t,n,i)}},s8=Qc&&Qc.__awaiter||function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},G0=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new W,this._sessionDisposables=new W,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(54)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(54)||!this._editor.hasModel())return;let e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let n=new oc;for(let r of t.autoFormatTriggerCharacters)n.add(r.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(r=>{let o=r.charCodeAt(r.length-1);n.has(o)&&this._trigger(String.fromCharCode(o))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=new qt,o=this._editor.onDidChangeModelContent(s=>{if(s.isFlush){r.cancel(),o.dispose();return}for(let a=0,l=s.changes.length;a {r.token.isCancellationRequested||Xt(s)&&(Uk.execute(this._editor,s,!0),Wk(s))}).finally(()=>{o.dispose()})}};G0.ID="editor.contrib.autoFormat";G0=iH([c4(1,le),c4(2,Xs)],G0);var $0=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new W,this._callOnModel=new W,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(53)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(u9,this.editor,e,2,Qo.None,ze.None).catch(Be))}};$0.ID="editor.contrib.formatOnPaste";$0=iH([c4(1,le),c4(2,Ce)],$0);var r8=class extends K{constructor(){super({id:"editor.action.formatDocument",label:g("formatDocument.label","Format Document"),alias:"Format Document",precondition:$.and(I.notInCompositeEditor,I.writable,I.hasDocumentFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return s8(this,void 0,void 0,function*(){if(t.hasModel()){let n=e.get(Ce);yield e.get(Gs).showWhile(n.invokeFunction(jk,t,1,Qo.None,ze.None),250)}})}},o8=class extends K{constructor(){super({id:"editor.action.formatSelection",label:g("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:$.and(I.writable,I.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2084),weight:100},contextMenuOpts:{when:I.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return s8(this,void 0,void 0,function*(){if(!t.hasModel())return;let n=e.get(Ce),r=t.getModel(),o=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,r.getLineMaxColumn(a.startLineNumber)):a);yield e.get(Gs).showWhile(n.invokeFunction(u9,t,o,1,Qo.None,ze.None),250)})}};Se(G0.ID,G0,2);Se($0.ID,$0,2);F(r8);F(o8);Je.registerCommand("editor.action.format",i=>s8(void 0,void 0,void 0,function*(){let e=i.get(_t).getFocusedCodeEditor();if(!e||!e.hasModel())return;let t=i.get(Pt);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}))});var $5,IB=Ka(()=>{Mi();$5=class{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){let r=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new ye(r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn),r.endLineNumber,Math.min(this._originalSelection.positionColumn,r.endColumn)):new ye(r.endLineNumber,r.endColumn-this._text.length,r.endLineNumber,r.endColumn)}}});var kB=Ka(()=>{});var AB=Ka(()=>{kB()});var LB=lt(jm=>{ct();it();g1();Me();Ie();Mi();ht();hn();Qf();be();IB();AB();var zte=jm&&jm.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ute=jm&&jm.__param||function(i,e){return function(t,n){e(t,n,i)}},Hl=class aw{static get(e){return e.getContribution(aw.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();let r=this.editor.getSelection(),o=this.editor.getModel();if(!o||!r)return;let s=r;if(s.startLineNumber!==s.endLineNumber)return;let a=new jf(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Ht(c=>this.editorWorkerService.navigateValueSet(l,s,t)),this.currentRequest.then(c=>{var d;if(!c||!c.range||!c.value||!a.validate(this.editor))return;let h=k.lift(c.range),u=c.range,m=c.value.length-(s.endColumn-s.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+c.value.length},m>1&&(s=new ye(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+m-1));let p=new $5(h,s,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,p),this.editor.pushUndoStop(),this.decorations.set([{range:u,options:aw.DECORATION}]),(d=this.decorationRemover)===null||d===void 0||d.cancel(),this.decorationRemover=$d(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(Be)}).catch(Be)):Promise.resolve(void 0)}};Hl.ID="editor.contrib.inPlaceReplaceController";Hl.DECORATION=Ue.register({description:"in-place-replace",className:"valueSetReplacement"});Hl=zte([Ute(1,Xs)],Hl);var lw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.up",label:g("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3159,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}},cw=class extends K{constructor(){super({id:"editor.action.inPlaceReplace.down",label:g("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:I.writable,kbOpts:{kbExpr:I.editorTextFocus,primary:3161,weight:100}})}run(e,t){let n=Hl.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}};Se(Hl.ID,Hl,4);F(lw);F(cw)});var mz=Ka(()=>{});var pz=Ka(()=>{mz()});var Ed,fz=Ka(()=>{wr();hj();be();mi();qe();Ed=class i extends Gr{constructor(){super({id:i.ID,title:{value:g({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(e){let t=e.get(we).getContextKeyValue("focusedView")==="terminal"?"terminalFocus":"editorFocus",r=!p9.getTabFocusMode(t);p9.setTabFocusMode(r,t),r?Kt(g("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Kt(g("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};Ed.ID="editor.action.toggleTabFocusMode";Ft(Ed)});var bz=lt(gp=>{pz();gt();lj();wr();Kf();re();Sn();Bt();wn();Me();ht();fz();qe();st();un();Xr();ch();var gz=gp&&gp.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ob=gp&&gp.__param||function(i,e){return function(t,n){e(t,n,i)}},_z=new Ne("accessibilityHelpWidgetVisible",!1),Td=class vz extends Y{static get(e){return e.getContribution(vz.ID)}constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(Ru,this._editor))}show(){this._widget.show()}hide(){this._widget.hide()}};Td.ID="editor.contrib.accessibilityHelpController";Td=gz([Ob(1,Ce)],Td);function qie(i,e){return!i||i.length===0?oi.noSelection:i.length===1?e?xr(oi.singleSelectionRange,i[0].positionLineNumber,i[0].positionColumn,e):xr(oi.singleSelection,i[0].positionLineNumber,i[0].positionColumn):e?xr(oi.multiSelectionRange,i.length,e):i.length>0?xr(oi.multiSelection,i.length):""}var Ru=class Pb extends $s{constructor(e,t,n,r){super(),this._contextKeyService=t,this._keybindingService=n,this._openerService=r,this._editor=e,this._isVisibleKey=_z.bindTo(this._contextKeyService),this._domNode=t9(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-modal","true"),this._domNode.setAttribute("aria-hidden","true");let o=oe(this._domNode.domNode,te("h1",void 0,oi.accessibilityHelpTitle));o.id="help-dialog-heading",this._domNode.setAttribute("aria-labelledby",o.id),this._contentDomNode=t9(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._contentDomNode.domNode.id="help-dialog-content",this._domNode.appendChild(this._contentDomNode),this._contentDomNode.setAttribute("aria-describedby",this._contentDomNode.domNode.id),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(Vr(this._contentDomNode.domNode,"keydown",s=>{if(this._isVisible&&(s.equals(2083)&&(Kt(oi.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),rn(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){Kt(oi.openingDocs);let a=this._editor.getRawOptions().accessibilityHelpUrl;typeof a=="undefined"&&(a="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(Qe.parse(a)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Pb.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,n){let r=this._keybindingService.lookupKeybinding(e);return r?xr(t,r.getAriaLabel()):xr(n,e)}_buildContent(){let e=this._contentDomNode.domNode,t=this._editor.getOptions(),n=this._editor.getSelections(),r=0;if(n){let c=this._editor.getModel();c&&n.forEach(d=>{r+=c.getValueLengthInRange(d)})}oe(e,te("p",void 0,qie(n,r)));let o=oe(e,te("p"));t.get(59)?t.get(88)?o.textContent=oi.readonlyDiffEditor:o.textContent=oi.editableDiffEditor:t.get(88)?o.textContent=oi.readonlyEditor:o.textContent=oi.editableEditor;let s=oe(e,te("ul")),a=Wi?oi.changeConfigToOnMac:oi.changeConfigToOnWinLinux;switch(t.get(2)){case 0:oe(s,te("li",void 0,a));break;case 2:oe(s,te("li",void 0,oi.auto_on));break;case 1:oe(s,te("li",void 0,oi.auto_off,a));break}t.get(139)?oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,oi.tabFocusModeOnMsg,oi.tabFocusModeOnMsgNoKb))):oe(s,te("li",void 0,this._descriptionForCommand(Ed.ID,oi.tabFocusModeOffMsg,oi.tabFocusModeOffMsgNoKb)));let l=Wi?oi.openDocMac:oi.openDocWinLinux;oe(s,te("li",void 0,l)),oe(e,te("p",void 0,oi.outroMsg))}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,rn(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(Pb.WIDTH,e.width-40)),n=Math.max(5,Math.min(Pb.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(n);let r=Math.round((e.height-n)/2);this._domNode.setTop(r);let o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}};Ru.ID="editor.contrib.accessibilityHelpWidget";Ru.WIDTH=500;Ru.HEIGHT=300;Ru=gz([Ob(1,we),Ob(2,mt),Ob(3,di)],Ru);var gx=class extends K{constructor(){super({id:"editor.action.showAccessibilityHelp",label:oi.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let n=Td.get(t);n==null||n.show()}};Se(Td.ID,Td,4);F(gx);var Gie=ni.bindToContribution(Td.get);ge(new Gie({id:"closeAccessibilityHelp",precondition:_z,handler:i=>i.hide(),kbOpts:{weight:100+100,kbExpr:I.focus,primary:9,secondary:[1033]}}))});var yz=Ka(()=>{});var Sz=Ka(()=>{yz()});var xz=lt(_p=>{Sz();gt();Xd();re();Me();dn();ZW();oj();$r();uj();ch();var $ie=_p&&_p.__decorate||function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Cz=_p&&_p.__param||function(i,e){return function(t,n){e(t,n,i)}},Mu=class wz extends Y{static get(e){return e.getContribution(wz.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(r=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(r=>this.stop())),this._register(ih.onDidChange(r=>this.stop())),this._register(this._editor.onKeyUp(r=>r.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Fb(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mu.ID="editor.contrib.inspectTokens";Mu=$ie([Cz(1,lA),Cz(2,ci)],Mu);var _x=class extends K{constructor(){super({id:"editor.action.inspectTokens",label:sA.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let n=Mu.get(t);n==null||n.launch()}};function Yie(i){let e="";for(let t=0,n=i.length;t lk,tokenize:(r,o,s)=>ck(e,s),tokenizeEncoded:(r,o,s)=>dk(n,s)}}var Fb=class i extends Y{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=Xie(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return i._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),n=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let r=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){r=l;break}let o=this._model.getLineContent(e.lineNumber),s="";if(n {(function(i){if(typeof EW=="object"&&typeof KE!="undefined")KE.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=i()}})(function(){var i,e,t;return function(){function n(r,o,s){function a(d,h){if(!o[d]){if(!r[d]){var u=typeof Xl=="function"&&Xl;if(!h&&u)return u(d,!0);if(l)return l(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var p=o[d]={exports:{}};r[d][0].call(p.exports,function(f){var _=r[d][1][f];return a(_||f)},p,p.exports,n,r,o,s)}return o[d].exports}for(var l=typeof Xl=="function"&&Xl,c=0;c _._averageHeight){var R=_._renderChunk();_._lastRepaint=w,R!==!1&&typeof b.afterRender=="function"&&b.afterRender()}}};C()}return s(m,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(f,_){var b;if(Object.assign(this._config,c,_),!f||f.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=f;var C=this._config,T=this._scroller||C.scroller||document.createElement(C.scrollerTagName||"tr");if(typeof C.useFragment!="boolean"&&(this._config.useFragment=!0),!C.generate)throw new Error("Missing required `generate` function");if(!d(C.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(C.itemHeight)&&!d(C.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());d(C.itemHeight)?this._itemHeights=Array(C.total).fill(C.itemHeight):this._itemHeights=C.itemHeight,Object.keys(c).filter(function(B){return B in C}).forEach(function(B){var Z=C[B],ee=d(Z);if(Z&&typeof Z!="string"&&typeof Z!="number"){var V="Invalid optional `"+B+"`, expected string or number";throw new Error(V)}else ee&&(C[B]=Z+"px")});var w=!!C.horizontal,A=C[w?"width":"height"];if(A){var O=d(A),R=O?!1:A.slice(-1)==="%",j=O?A:parseInt(A.replace(/px|%/,""),10),q=window[w?"innerWidth":"innerHeight"];R?this._containerSize=q*j/100:this._containerSize=d(A)?A:j}var _e=C.scrollContainer,J=C.itemHeight*C.total,ke=this._maxElementHeight;J>ke&&console.warn(["HyperList: The maximum element height",ke+"px has","been exceeded; please reduce your item height."].join(" "));var Oe={width:""+C.width,height:_e?J+"px":""+C.height,overflow:_e?"none":"auto",position:"relative"};m.mergeStyle(f,Oe),_e&&m.mergeStyle(C.scrollContainer,{overflow:"auto"});var Pe=(b={opacity:"0",position:"absolute"},a(b,w?"height":"width","1px"),a(b,w?"width":"height",J+"px"),b);m.mergeStyle(T,Pe),this._scroller||f.appendChild(T);var et=this._computeScrollPadding();this._scrollPaddingBottom=et.bottom,this._scrollPaddingTop=et.top,this._scroller=T,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(C.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof C.afterRender=="function"&&C.afterRender()}},{key:"_getRow",value:function(f){var _=this._config,b=_.generate(f),C=b.height;if(C!==void 0&&d(C)?(b=b.element,C!==this._itemHeights[f]&&(this._itemHeights[f]=C,this._computePositions(f),this._scrollHeight=this._computeScrollHeight(f))):C=this._itemHeights[f],!b||b.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+f);h(b,_.rowClassName||"vrow");var T=this._itemPositions[f]+this._scrollPaddingTop;return m.mergeStyle(b,a({position:"absolute"},_.horizontal?"left":"top",T+"px")),b}},{key:"_getScrollPosition",value:function(){var f=this._config;return typeof f.overrideScrollPosition=="function"?f.overrideScrollPosition():this._element[f.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(f){var _=this._config,b=this._element,C=this._getScrollPosition(),T=_.total,w=_.reverse?this._getReverseFrom(C):this._getFrom(C)-1;if((w<0||w-this._screenItemsLen<0)&&(w=0),!f&&this._lastFrom===w)return!1;this._lastFrom=w;var A=w+this._cachedItemsLen;(A>T||A+this._cachedItemsLen>T)&&(A=T);var O=_.useFragment?document.createDocumentFragment():[],R=this._scroller;O[_.useFragment?"appendChild":"push"](R);for(var j=w;j0&&arguments[0]!==void 0?arguments[0]:1,_=this._config,b=_.total,C=_.reverse;f<1&&!C&&(f=1);for(var T=f;T0&&this._itemPositions[_] {(function(i,e){"use strict";function t(){n.width=i.innerWidth,n.height=5*c.barThickness;var h=n.getContext("2d");h.shadowBlur=c.shadowBlur,h.shadowColor=c.shadowColor;var u,m=h.createLinearGradient(0,0,n.width,0);for(u in c.barColors)m.addColorStop(u,c.barColors[u]);h.lineWidth=c.barThickness,h.beginPath(),h.moveTo(0,c.barThickness/2),h.lineTo(Math.ceil(r*n.width),c.barThickness/2),h.strokeStyle=m,h.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},d={config:function(h){for(var u in h)c.hasOwnProperty(u)&&(c[u]=h[u])},show:function(h){var u,m;o||(h?l=l||setTimeout(()=>d.show(),h):(o=!0,a!==null&&i.cancelAnimationFrame(a),n||((m=(n=e.createElement("canvas")).style).position="fixed",m.top=m.left=m.right=m.margin=m.padding=0,m.zIndex=100001,m.display="none",c.className&&n.classList.add(c.className),e.body.appendChild(n),u="resize",h=t,(m=i).addEventListener?m.addEventListener(u,h,!1):m.attachEvent?m.attachEvent("on"+u,h):m["on"+u]=h),n.style.opacity=1,n.style.display="block",d.progress(0),c.autoRun&&function p(){s=i.requestAnimationFrame(p),d.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(h){return h===void 0||(typeof h=="string"&&(h=(0<=h.indexOf("+")||0<=h.indexOf("-")?r:0)+parseFloat(h)),r=1 typeof i=="function"?i:function(){return i},mj=typeof self!="undefined"?self:null,x1=typeof window!="undefined"?window:null,T1=mj||x1||T1,pj="2.0.0",ts={connecting:0,open:1,closing:2,closed:3},fj=1e4,gj=1e3,Lr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Zs={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},T9={longpoll:"longpoll",websocket:"websocket"},_j={complete:4},cg=class{constructor(i,e,t,n){this.channel=i,this.event=e,this.payload=t||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(i){this.timeout=i,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(i,e){return this.hasReceived(i)&&e(this.receivedResp.response),this.recHooks.push({status:i,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:i,response:e,_ref:t}){this.recHooks.filter(n=>n.status===i).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,i=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=i,this.matchReceive(i)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(i){return this.receivedResp&&this.receivedResp.status===i}trigger(i,e){this.channel.trigger(this.refEvent,{status:i,response:e})}},cA=class{constructor(i,e){this.callback=i,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},vj=class{constructor(i,e,t){this.state=Lr.closed,this.topic=i,this.params=E1(e||{}),this.socket=t,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new cg(this,Zs.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new cA(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Lr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Lr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Lr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new cg(this,Zs.leave,E1({}),this.timeout).send(),this.state=Lr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Zs.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(i=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=i,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(i){this.on(Zs.close,i)}onError(i){return this.on(Zs.error,e=>i(e))}on(i,e){let t=this.bindingRef++;return this.bindings.push({event:i,ref:t,callback:e}),t}off(i,e){this.bindings=this.bindings.filter(t=>!(t.event===i&&(typeof e=="undefined"||e===t.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(i,e,t=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${i}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new cg(this,i,function(){return e},t);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(i=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Lr.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Zs.close,"leave")},t=new cg(this,Zs.leave,E1({}),i);return t.receive("ok",()=>e()).receive("timeout",()=>e()),t.send(),this.canPush()||t.trigger("ok",{}),t}onMessage(i,e,t){return e}isMember(i,e,t,n){return this.topic!==i?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:i,event:e,payload:t,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(i=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Lr.joining,this.joinPush.resend(i))}trigger(i,e,t,n){let r=this.onMessage(i,e,t,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===i);for(let s=0;s {let a=this.parseJSON(i.responseText);s&&s(a)},o&&(i.ontimeout=o),i.onprogress=()=>{},i.send(n),i}static xhrRequest(i,e,t,n,r,o,s,a){return i.open(e,t,!0),i.timeout=o,i.setRequestHeader("Content-Type",n),i.onerror=()=>a&&a(null),i.onreadystatechange=()=>{if(i.readyState===_j.complete&&a){let l=this.parseJSON(i.responseText);a(l)}},s&&(i.ontimeout=s),i.send(r),i}static parseJSON(i){if(!i||i==="")return null;try{return JSON.parse(i)}catch(e){return console&&console.log("failed to parse JSON response",i),null}}static serialize(i,e){let t=[];for(var n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=e?`${e}[${n}]`:n,o=i[n];typeof o=="object"?t.push(this.serialize(o,r)):t.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return t.join("&")}static appendParams(i,e){if(Object.keys(e).length===0)return i;let t=i.match(/\?/)?"&":"?";return`${i}${t}${this.serialize(e)}`}},E9=class{constructor(i){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(i),this.readyState=ts.connecting,this.poll()}normalizeEndpoint(i){return i.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+T9.websocket),"$1/"+T9.longpoll)}endpointURL(){return hg.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(i,e,t){this.close(i,e,t),this.readyState=ts.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ts.open||this.readyState===ts.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),i=>{if(i){var{status:e,token:t,messages:n}=i;this.token=t}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ts.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(i){this.currentBatch?this.currentBatch.push(i):this.awaitingBatchAck?this.batchBuffer.push(i):(this.currentBatch=[i],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(i){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",i.join(` `),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(i,e,t){for(let r of this.reqs)r.abort();this.readyState=ts.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:i,reason:e,wasClean:t});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(i,e,t,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=hg.request(i,this.endpointURL(),e,t,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var dg={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(i,e){if(i.payload.constructor===ArrayBuffer)return e(this.binaryEncode(i));{let t=[i.join_ref,i.ref,i.topic,i.event,i.payload];return e(JSON.stringify(t))}},decode(i,e){if(i.constructor===ArrayBuffer)return e(this.binaryDecode(i));{let[t,n,r,o,s]=JSON.parse(i);return e({join_ref:t,ref:n,topic:r,event:o,payload:s})}},binaryEncode(i){let{join_ref:e,ref:t,event:n,topic:r,payload:o}=i,s=this.META_LENGTH+e.length+t.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(t,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(r,h=>l.setUint8(c++,h.charCodeAt(0))),Array.from(n,h=>l.setUint8(c++,h.charCodeAt(0)));var d=new Uint8Array(a.byteLength+o.byteLength);return d.set(new Uint8Array(a),0),d.set(new Uint8Array(o),a.byteLength),d.buffer},binaryDecode(i){let e=new DataView(i),t=e.getUint8(0),n=new TextDecoder;switch(t){case this.KINDS.push:return this.decodePush(i,e,n);case this.KINDS.reply:return this.decodeReply(i,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(i,e,n)}},decodePush(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=t.decode(i.slice(s,s+n));s=s+n;let l=t.decode(i.slice(s,s+r));s=s+r;let c=t.decode(i.slice(s,s+o));s=s+o;let d=i.slice(s,i.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:d}},decodeReply(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=t.decode(i.slice(a,a+n));a=a+n;let c=t.decode(i.slice(a,a+r));a=a+r;let d=t.decode(i.slice(a,a+o));a=a+o;let h=t.decode(i.slice(a,a+s));a=a+s;let u=i.slice(a,i.byteLength),m={status:h,response:u};return{join_ref:l,ref:c,topic:d,event:Zs.reply,payload:m}},decodeBroadcast(i,e,t){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=t.decode(i.slice(o,o+n));o=o+n;let a=t.decode(i.slice(o,o+r));o=o+r;let l=i.slice(o,i.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},ug=class{constructor(i,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||fj,this.transport=e.transport||T1.WebSocket||E9,this.establishedConnections=0,this.defaultEncoder=dg.encode.bind(dg),this.defaultDecoder=dg.decode.bind(dg),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==E9?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let t=null;x1&&x1.addEventListener&&(x1.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),t=this.connectClock)}),x1.addEventListener("pageshow",n=>{t===this.connectClock&&(t=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=E1(e.params||{}),this.endPoint=`${i}/${T9.websocket}`,this.vsn=e.vsn||pj,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new cA(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return E9}replaceTransport(i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=i}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let i=hg.appendParams(hg.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return i.charAt(0)!=="/"?i:i.charAt(1)==="/"?`${this.protocol()}:${i}`:`${this.protocol()}://${location.host}${i}`}disconnect(i,e,t){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(i,e,t)}connect(i){i&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=E1(i)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(i,e,t){this.logger(i,e,t)}hasLogger(){return this.logger!==null}onOpen(i){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,i]),e}onClose(i){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,i]),e}onError(i){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,i]),e}onMessage(i){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,i]),e}ping(i){if(!this.isConnected())return!1;let e=this.makeRef(),t=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),i(Date.now()-t))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,i])=>i())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),gj,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(i,e,t){if(!this.conn)return i&&i();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,t||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),i&&i()})})}waitForBufferDone(i,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){i();return}setTimeout(()=>{this.waitForBufferDone(i,e+1)},150*e)}waitForSocketClosed(i,e=1){if(e===5||!this.conn||this.conn.readyState===ts.closed){i();return}setTimeout(()=>{this.waitForSocketClosed(i,e+1)},150*e)}onConnClose(i){let e=i&&i.code;this.hasLogger()&&this.log("transport","close",i),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(i))}onConnError(i){this.hasLogger()&&this.log("transport",i);let e=this.transport,t=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(i,e,t)}),(e===this.transport||t>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(i=>{i.isErrored()||i.isLeaving()||i.isClosed()||i.trigger(Zs.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case ts.connecting:return"connecting";case ts.open:return"open";case ts.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(i){this.off(i.stateChangeRefs),this.channels=this.channels.filter(e=>e.joinRef()!==i.joinRef())}off(i){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([t])=>i.indexOf(t)===-1)}channel(i,e={}){let t=new vj(i,e,this);return this.channels.push(t),t}push(i){if(this.hasLogger()){let{topic:e,event:t,payload:n,ref:r,join_ref:o}=i;this.log("push",`${e} ${t} (${o}, ${r})`,n)}this.isConnected()?this.encode(i,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(i,e=>this.conn.send(e)))}makeRef(){let i=this.ref+1;return i===this.ref?this.ref=0:this.ref=i,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(i=>i()),this.sendBuffer=[])}onConnMessage(i){this.decode(i.data,e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;a t.topic===i&&(t.isJoined()||t.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${i}"`),e.leave())}};var RA="consecutive-reloads",bj=10,yj=5e3,Sj=1e4,Cj=3e4,MA=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],Dr="data-phx-component",I9="data-phx-link",wj="track-static",xj="data-phx-link-state",Jr="data-phx-ref",fc="data-phx-ref-src",OA="track-uploads",gc="data-phx-upload-ref",W9="data-phx-preflighted-refs",Ej="data-phx-done-refs",dA="drop-target",H9="data-phx-active-refs",wg="phx:live-file:updated",B9="data-phx-skip",hA="data-phx-prune",uA="page-loading",mA="phx-connected",I1="phx-loading",k9="phx-no-feedback",mg="phx-error",pA="phx-client-error",A9="phx-server-error",uh="data-phx-parent-id",j9="data-phx-main",P1="data-phx-root-id",PA="viewport-top",FA="viewport-bottom",Tj="trigger-action",Eg="feedback-for",z9="phx-has-focused",Ij=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],HA=["checkbox","radio"],Tg="phx-has-submitted",cl="data-phx-session",ph=`[${cl}]`,fA="data-phx-sticky",M1="data-phx-static",L9="data-phx-readonly",pg="data-phx-disabled",U9="disable-with",fg="data-phx-disable-with-restore",k1="hook",kj="debounce",Aj="throttle",Ig="update",N9="stream",A1="data-phx-stream",Lj="key",is="phxPrivate",gA="auto-recover",gg="phx:live-socket:debug",D9="phx:live-socket:profiling",R9="phx:live-socket:latency-sim",Nj="progress",_A="mounted",Dj=1,Rj=200,Mj="phx-",Oj=3e4,L1="debounce-trigger",_g="throttled",vA="debounce-prev-key",Pj={debounce:300,throttle:300},M9="d",ns="s",Nr="c",bA="e",yA="r",SA="t",Fj="p",CA="stream",Hj=class{constructor(i,e,t){this.liveSocket=t,this.entry=i,this.offset=0,this.chunkSize=e,this.chunkTimer=null,this.errored=!1,this.uploadChannel=t.channel(`lvu:${i.ref}`,{token:i.metadata()})}error(i){this.errored||(this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(i))}upload(){this.uploadChannel.onError(i=>this.error(i)),this.uploadChannel.join().receive("ok",i=>this.readNextChunk()).receive("error",i=>this.error(i))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let i=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);i.onload=t=>{if(t.target.error===null)this.offset+=t.target.result.byteLength,this.pushChunk(t.target.result);else return Nn("Read error: "+t.target.error)},i.readAsArrayBuffer(e)}pushChunk(i){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",i).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Nn=(i,e)=>console.error&&console.error(i,e),al=i=>{let e=typeof i;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(i)};function Bj(){let i=new Set,e=document.querySelectorAll("*[id]");for(let t=0,n=e.length;t {i.liveSocket.isDebugEnabled()&&console.log(`${i.id} ${e}: ${t} - `,n)},O9=i=>typeof i=="function"?i:function(){return i},xg=i=>JSON.parse(JSON.stringify(i)),O1=(i,e,t)=>{do{if(i.matches(`[${e}]`)&&!i.disabled)return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1&&!(t&&t.isSameNode(i)||i.matches(ph)));return null},N1=i=>i!==null&&typeof i=="object"&&!(i instanceof Array),Uj=(i,e)=>JSON.stringify(i)===JSON.stringify(e),wA=i=>{for(let e in i)return!1;return!0},ll=(i,e)=>i&&e(i),Wj=function(i,e,t,n){i.forEach(r=>{new Hj(r,t.config.chunk_size,n).upload()})},BA={canPushState(){return typeof history.pushState!="undefined"},dropLocal(i,e,t){return i.removeItem(this.localKey(e,t))},updateLocal(i,e,t,n,r){let o=this.getLocal(i,e,t),s=this.localKey(e,t),a=o===null?n:r(o);return i.setItem(s,JSON.stringify(a)),a},getLocal(i,e,t){return JSON.parse(i.getItem(this.localKey(e,t)))},updateCurrentState(i){this.canPushState()&&history.replaceState(i(history.state||{}),"",window.location.href)},pushState(i,e,t){if(this.canPushState()){if(t!==window.location.href){if(e.type=="redirect"&&e.scroll){let r=history.state||{};r.scroll=e.scroll,history.replaceState(r,"",window.location.href)}delete e.scroll,history[i+"State"](e,"",t||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)}}else this.redirect(t)},setCookie(i,e){document.cookie=`${i}=${e}`},getCookie(i){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${i}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(i,e){e&&BA.setCookie("__phoenix_flash__",e+"; max-age=60000; path=/"),window.location=i},localKey(i,e){return`${i}-${e}`},getHashTargetEl(i){let e=i.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},rs=BA,Qr={byId(i){return document.getElementById(i)||Nn(`no id found for ${i}`)},removeClass(i,e){i.classList.remove(e),i.classList.length===0&&i.removeAttribute("class")},all(i,e,t){if(!i)return[];let n=Array.from(i.querySelectorAll(e));return t?n.forEach(t):n},childNodeLength(i){let e=document.createElement("template");return e.innerHTML=i,e.content.childElementCount},isUploadInput(i){return i.type==="file"&&i.getAttribute(gc)!==null},findUploadInputs(i){return this.all(i,`input[type="file"][${gc}]`)},findComponentNodeList(i,e){return this.filterWithinSameLiveView(this.all(i,`[${Dr}="${e}"]`),i)},isPhxDestroyed(i){return!!(i.id&&Qr.private(i,"destroyed"))},wantsNewTab(i){let e=i.ctrlKey||i.shiftKey||i.metaKey||i.button&&i.button===1,t=i.target instanceof HTMLAnchorElement&&i.target.hasAttribute("download"),n=i.target.hasAttribute("target")&&i.target.getAttribute("target").toLowerCase()==="_blank";return e||n||t},isUnloadableFormSubmit(i){return!i.defaultPrevented&&!this.wantsNewTab(i)},isNewPageClick(i,e){let t=i.target instanceof HTMLAnchorElement?i.target.getAttribute("href"):null,n;if(i.defaultPrevented||t===null||this.wantsNewTab(i)||t.startsWith("mailto:")||t.startsWith("tel:"))return!1;try{n=new URL(t)}catch(r){try{n=new URL(t,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(i){this.isPhxChild(i)&&i.setAttribute(cl,""),this.putPrivate(i,"destroyed",!0)},findPhxChildrenInFragment(i,e){let t=document.createElement("template");return t.innerHTML=i,this.findPhxChildren(t.content,e)},isIgnored(i,e){return(i.getAttribute(e)||i.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(i,e,t){return i.getAttribute&&t.indexOf(i.getAttribute(e))>=0},findPhxSticky(i){return this.all(i,`[${fA}]`)},findPhxChildren(i,e){return this.all(i,`${ph}[${uh}="${e}"]`)},findParentCIDs(i,e){let t=new Set(e),n=e.reduce((r,o)=>{let s=`[${Dr}="${o}"] [${Dr}]`;return this.filterWithinSameLiveView(this.all(i,s),i).map(a=>parseInt(a.getAttribute(Dr))).forEach(a=>r.delete(a)),r},t);return n.size===0?new Set(e):n},filterWithinSameLiveView(i,e){return e.querySelector(ph)?i.filter(t=>this.withinSameLiveView(t,e)):i},withinSameLiveView(i,e){for(;i=i.parentNode;){if(i.isSameNode(e))return!0;if(i.getAttribute(cl)!==null)return!1}},private(i,e){return i[is]&&i[is][e]},deletePrivate(i,e){i[is]&&delete i[is][e]},putPrivate(i,e,t){i[is]||(i[is]={}),i[is][e]=t},updatePrivate(i,e,t,n){let r=this.private(i,e);r===void 0?this.putPrivate(i,e,n(t)):this.putPrivate(i,e,n(r))},copyPrivates(i,e){e[is]&&(i[is]=e[is])},putTitle(i){let e=document.querySelector("title");if(e){let{prefix:t,suffix:n}=e.dataset;document.title=`${t||""}${i}${n||""}`}else document.title=i},debounce(i,e,t,n,r,o,s,a){let l=i.getAttribute(t),c=i.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let d=l||c;switch(d){case null:return a();case"blur":this.once(i,"debounce-blur")&&i.addEventListener("blur",()=>a());return;default:let h=parseInt(d),u=()=>c?this.deletePrivate(i,_g):a(),m=this.incCycle(i,L1,u);if(isNaN(h))return Nn(`invalid throttle/debounce value: ${d}`);if(c){let f=!1;if(e.type==="keydown"){let _=this.private(i,vA);this.putPrivate(i,vA,e.key),f=_!==e.key}if(!f&&this.private(i,_g))return!1;a(),this.putPrivate(i,_g,!0),setTimeout(()=>{s()&&this.triggerCycle(i,L1)},h)}else setTimeout(()=>{s()&&this.triggerCycle(i,L1,m)},h);let p=i.form;p&&this.once(p,"bind-debounce")&&p.addEventListener("submit",()=>{Array.from(new FormData(p).entries(),([f])=>{let _=p.querySelector(`[name="${f}"]`);this.incCycle(_,L1),this.deletePrivate(_,_g)})}),this.once(i,"bind-debounce")&&i.addEventListener("blur",()=>this.triggerCycle(i,L1))}},triggerCycle(i,e,t){let[n,r]=this.private(i,e);t||(t=n),t===n&&(this.incCycle(i,e),r())},once(i,e){return this.private(i,e)===!0?!1:(this.putPrivate(i,e,!0),!0)},incCycle(i,e,t=function(){}){let[n]=this.private(i,e)||[0,t];return n++,this.putPrivate(i,e,[n,t]),n},maybeAddPrivateHooks(i,e,t){i.hasAttribute&&(i.hasAttribute(e)||i.hasAttribute(t))&&i.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},maybeHideFeedback(i,e,t){if(!(this.private(e,z9)||this.private(e,Tg))){let n=[e.name];e.name.endsWith("[]")&&n.push(e.name.slice(0,-2));let r=n.map(o=>`[${t}="${o}"]`).join(", ");Qr.all(i,r,o=>o.classList.add(k9))}},resetForm(i,e){Array.from(i.elements).forEach(t=>{let n=`[${e}="${t.id}"], [${e}="${t.name}"], [${e}="${t.name.replace(/\[\]$/,"")}"]`;this.deletePrivate(t,z9),this.deletePrivate(t,Tg),this.all(document,n,r=>{r.classList.add(k9)})})},showError(i,e){(i.id||i.name)&&this.all(i.form,`[${e}="${i.id}"], [${e}="${i.name}"]`,t=>{this.removeClass(t,k9)})},isPhxChild(i){return i.getAttribute&&i.getAttribute(uh)},isPhxSticky(i){return i.getAttribute&&i.getAttribute(fA)!==null},firstPhxChild(i){return this.isPhxChild(i)?i:this.all(i,`[${uh}]`)[0]},dispatchEvent(i,e,t={}){let r={bubbles:t.bubbles===void 0?!0:!!t.bubbles,cancelable:!0,detail:t.detail||{}},o=e==="click"?new MouseEvent("click",r):new CustomEvent(e,r);i.dispatchEvent(o)},cloneNode(i,e){if(typeof e=="undefined")return i.cloneNode(!0);{let t=i.cloneNode(!1);return t.innerHTML=e,t}},mergeAttrs(i,e,t={}){let n=t.exclude||[],r=t.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n.indexOf(l)<0&&i.setAttribute(l,e.getAttribute(l))}let s=i.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&i.removeAttribute(l):e.hasAttribute(l)||i.removeAttribute(l)}},mergeFocusedInput(i,e){i instanceof HTMLSelectElement||Qr.mergeAttrs(i,e,{exclude:["value"]}),e.readOnly?i.setAttribute("readonly",!0):i.removeAttribute("readonly")},hasSelectionRange(i){return i.setSelectionRange&&(i.type==="text"||i.type==="textarea")},restoreFocus(i,e,t){if(!Qr.isTextualInput(i))return;let n=i.matches(":focus");i.readOnly&&i.blur(),n||i.focus(),this.hasSelectionRange(i)&&i.setSelectionRange(e,t)},isFormInput(i){return/^(?:input|select|textarea)$/i.test(i.tagName)&&i.type!=="button"},syncAttrsToProps(i){i instanceof HTMLInputElement&&HA.indexOf(i.type.toLocaleLowerCase())>=0&&(i.checked=i.getAttribute("checked")!==null)},isTextualInput(i){return Ij.indexOf(i.type)>=0},isNowTriggerFormExternal(i,e){return i.getAttribute&&i.getAttribute(e)!==null},syncPendingRef(i,e,t){let n=i.getAttribute(Jr);if(n===null)return!0;let r=i.getAttribute(fc);return Qr.isFormInput(i)||i.getAttribute(t)!==null?(Qr.isUploadInput(i)&&Qr.mergeAttrs(i,e,{isIgnored:!0}),Qr.putPrivate(i,Jr,e),!1):(MA.forEach(o=>{i.classList.contains(o)&&e.classList.add(o)}),e.setAttribute(Jr,n),e.setAttribute(fc,r),!0)},cleanChildNodes(i,e){if(Qr.isPhxUpdate(i,e,["append","prepend"])){let t=[];i.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Nn(`only HTML element tags with an id are allowed inside containers with phx-update. removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}" -`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",cl,M1,j9,P1]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(Qr.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=Qr.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},$=Qr,P9=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(H9).split(",").indexOf(Ln.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(W9).split(",").indexOf(Ln.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=Ln.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(wg,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Ln.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(wg,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),Ln.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(wg,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(H9).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Nn(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:Wj}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Nn(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},jj=0,Ln=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(jj++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return $.findUploadInputs(i).forEach(t=>{t.getAttribute(W9)!==t.getAttribute(Ej)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(gc);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(gc),$.putPrivate(i,"files",[])}static untrackFile(i,e){$.putPrivate(i,"files",$.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));$.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),$.putPrivate(i,"files",e)}static activeFileInputs(i){let e=$.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return($.private(i,"files")||[]).filter(e=>P9.isActive(i,e))}static inputsAwaitingPreflight(i){let e=$.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!P9.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(Ln.filesAwaitingPreflight(i)||[]).map(n=>new P9(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},Vj={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},mh=Vj,zA={LiveFileUpload:{activeRefs(){return this.el.getAttribute(H9)},preflightedRefs(){return this.el.getAttribute(W9)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(wg))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(gc)),Ln.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>mh.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>mh.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&mh.focusFirst(this.el)}}},xA=()=>document.documentElement.scrollTop||document.body.scrollTop,V9=()=>window.innerHeight||document.documentElement.clientHeight,Kj=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()},qj=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=V9()},EA=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()};zA.InfiniteScroll={mounted(){let i=xA(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=xA();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),h=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),u=this.el.lastElementChild,m=this.el.firstElementChild,p=li;p&&d&&!e&&c.top>=0?(e=!0,r(d,m)):f&&e&&c.top<=0&&(e=!1),d&&p&&Kj(m)?o(d,m):h&&f&&qj(u)&&s(h,u),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var Gj=zA,$j=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=$.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?ll(document.getElementById(e.previousElementId),t=>{ll(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):ll(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{ll(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},TA=11;function Yj(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===TA||i.nodeType===TA)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var vg,Xj="http://www.w3.org/1999/xhtml",or=typeof document=="undefined"?void 0:document,Qj=!!or&&"content"in or.createElement("template"),Jj=!!or&&or.createRange&&"createContextualFragment"in or.createRange();function Zj(i){var e=or.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function eV(i){vg||(vg=or.createRange(),vg.selectNode(or.body));var e=vg.createContextualFragment(i);return e.childNodes[0]}function tV(i){var e=or.createElement("body");return e.innerHTML=i,e.childNodes[0]}function iV(i){return i=i.trim(),Qj?Zj(i):Jj?eV(i):tV(i)}function bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function nV(i,e){return!e||e===Xj?or.createElement(i):or.createElementNS(e,i)}function rV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function F9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var IA={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}F9(i,e,"selected")},INPUT:function(i,e){F9(i,e,"checked"),F9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},D1=1,kA=11,AA=3,LA=8;function sl(){}function oV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function sV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=or.createElement("html"),n.innerHTML=o}else n=iV(n);else n.nodeType===kA&&(n=n.firstElementChild);var s=r.getNodeKey||oV,a=r.onBeforeNodeAdded||sl,l=r.onNodeAdded||sl,c=r.onBeforeElUpdated||sl,d=r.onElUpdated||sl,h=r.onBeforeNodeDiscarded||sl,u=r.onNodeDiscarded||sl,m=r.onBeforeElChildrenUpdated||sl,p=r.skipFromChildren||sl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===D1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===D1||Z.nodeType===kA)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function R(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):R(ee)}else R(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):IA.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,yi,ei,Mt;e:for(;H;){for(ei=H.nextSibling,X=s(H);!V&&U;){if(yi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=ei,U=yi;continue e}Tt=s(U);var ki=U.nodeType,Ot=void 0;if(ki===H.nodeType&&(ki===D1?(X?X!==Tt&&((Mt=b[X])?yi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&bg(U,H),Ot&&q(U,H)):(ki===AA||ki==LA)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=ei,U=yi;continue e}Tt?T(Tt):A(U,Z,!0),U=yi}if(X&&(Mt=b[X])&&bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var zn=a(H);zn!==!1&&(zn&&(H=zn),H.actualize&&(H=H.actualize(Z.ownerDocument||or)),f(Z,H),R(H))}H=ei,U=yi}j(Z,U,Tt);var Cr=IA[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===D1)Oe===D1?bg(t,n)||(u(t),J=rV(t,nV(n.nodeName,n.namespaceURI))):J=n;else if(ke===AA||ke===LA){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe {if(t&&t.isSameNode(n)&&$.isFormInput(n))return $.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=al(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Ig);$.all(this.container,`[${i}=${N9}]`,e=>e.innerHTML=""),$.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(hA,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&$.hasSelectionRange(o)?o:{},l=e.binding(Ig),c=e.binding(Eg),d=e.binding(U9),h=e.binding(PA),u=e.binding(FA),m=e.binding(Tj),p=[],f=[],_=[],b=[],C=null,T=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([w,A,O,R])=>{Object.entries(A).forEach(([j,[q,_e]])=>{this.streamInserts[j]={ref:w,streamAt:q,limit:_e}}),R!==void 0&&$.all(t,`[${A1}="${w}"]`,j=>{this.removeStreamChildElement(j)}),O.forEach(j=>{let q=t.querySelector(`[id="${j}"]`);q&&this.removeStreamChildElement(q)})}),NA(r,T,{childrenOnly:r.getAttribute(Dr)===null,getNodeKey:w=>$.isPhxDestroyed(w)?null:w.id,skipFromChildren:w=>w.getAttribute(l)===N9,addChild:(w,A)=>{let{ref:O,streamAt:R,limit:j}=this.getStreamInsert(A);if(O===void 0)return w.appendChild(A);if($.putSticky(A,A1,J=>J.setAttribute(A1,O)),R===0)w.insertAdjacentElement("afterbegin",A);else if(R===-1)w.appendChild(A);else if(R>0){let J=Array.from(w.children)[R];w.insertBefore(A,J)}let q=j!==null&&Array.from(w.children),_e=[];j&&j<0&&q.length>j*-1?_e=q.slice(0,q.length+j):j&&j>=0&&q.length>j&&(_e=q.slice(j)),_e.forEach(J=>{this.streamInserts[J.id]||this.removeStreamChildElement(J)})},onBeforeNodeAdded:w=>($.maybeAddPrivateHooks(w,h,u),this.trackBefore("added",w),w),onNodeAdded:w=>{w.getAttribute&&this.maybeReOrderStream(w),w instanceof HTMLImageElement&&w.srcset?w.srcset=w.srcset:w instanceof HTMLVideoElement&&w.autoplay&&w.play(),$.isNowTriggerFormExternal(w,m)&&(C=w),w.getAttribute&&w.getAttribute("name")&&$.isFormInput(w)&&f.push(w),($.isPhxChild(w)&&i.ownsElement(w)||$.isPhxSticky(w)&&i.ownsElement(w.parentNode))&&this.trackAfter("phxChildAdded",w),p.push(w)},onNodeDiscarded:w=>this.onNodeDiscarded(w),onBeforeNodeDiscarded:w=>w.getAttribute&&w.getAttribute(hA)!==null?!0:!(w.parentElement!==null&&w.id&&$.isPhxUpdate(w.parentElement,l,[N9,"append","prepend"])||this.maybePendingRemove(w)||this.skipCIDSibling(w)),onElUpdated:w=>{$.isNowTriggerFormExternal(w,m)&&(C=w),_.push(w),this.maybeReOrderStream(w)},onBeforeElUpdated:(w,A)=>{if($.maybeAddPrivateHooks(A,h,u),$.cleanChildNodes(A,l),this.skipCIDSibling(A)||$.isPhxSticky(w))return!1;if($.isIgnored(w,l)||w.form&&w.form.isSameNode(C))return this.trackBefore("updated",w,A),$.mergeAttrs(w,A,{isIgnored:!0}),_.push(w),$.applyStickyOperations(w),!1;if(w.type==="number"&&w.validity&&w.validity.badInput)return!1;if(!$.syncPendingRef(w,A,d))return $.isUploadInput(w)&&(this.trackBefore("updated",w,A),_.push(w)),$.applyStickyOperations(w),!1;if($.isPhxChild(A)){let R=w.getAttribute(cl);return $.mergeAttrs(w,A,{exclude:[M1]}),R!==""&&w.setAttribute(cl,R),w.setAttribute(P1,this.rootID),$.applyStickyOperations(w),!1}return $.copyPrivates(A,w),o&&w.isSameNode(o)&&$.isFormInput(w)&&w.type!=="hidden"?(this.trackBefore("updated",w,A),$.mergeFocusedInput(w,A),$.syncAttrsToProps(w),_.push(w),$.applyStickyOperations(w),f.push(w),!1):($.isPhxUpdate(A,l,["append","prepend"])&&b.push(new $j(w,A,A.getAttribute(l))),$.syncAttrsToProps(A),$.applyStickyOperations(A),A.getAttribute("name")&&$.isFormInput(A)&&f.push(A),this.trackBefore("updated",w,A),!0)}})}),e.isDebugEnabled()&&Bj(),b.length>0&&e.time("post-morph append/prepend restoration",()=>{b.forEach(w=>w.perform())}),f.forEach(w=>{$.maybeHideFeedback(r,w,c)}),e.silenceEvents(()=>$.restoreFocus(o,s,a)),$.dispatchEvent(document,"phx:update"),p.forEach(w=>this.trackAfter("added",w)),_.forEach(w=>this.trackAfter("updated",w)),this.transitionPendingRemoves(),C&&(e.unload(),C.submit()),!0}onNodeDiscarded(i){($.isPhxChild(i)||$.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if($.putSticky(i,A1,r=>r.setAttribute(A1,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=$.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(B9)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=$.findComponentNodeList(this.container,this.targetCID);return t.length===0&&$.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Dr)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=$.cloneNode(n);let[l,...c]=$.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Dr)!==this.targetCID.toString()&&(d.setAttribute(B9,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},DA=class{static extract(i){let{[yA]:e,[bA]:t,[SA]:n}=i;return delete i[yA],delete i[bA],delete i[SA],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Nr],i);return[e,t]}recursiveToString(i,e=i[Nr],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Nr]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Nr]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Nr][e]}mergeDiff(i){let e=i[Nr],t={};if(delete i[Nr],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Nr]=this.rendered[Nr]||{},e){let n=this.rendered[Nr];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Nr]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[ns];if(al(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[ns],o=this.cloneMerge(l,e),o[ns]=s}else o=e[ns]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[ns]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];N1(n)&&n[ns]===void 0&&N1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=me(me({},i),e);for(let n in t){let r=e[n],o=i[n];N1(r)&&r[ns]===void 0&&N1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Nr],i);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Nr][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[ns]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[M9])return this.comprehensionToBuffer(i,e,t);let{[ns]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r 0||l.length>0||c)&&(delete i[CA],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else N1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t){let n=i[e]||Nn(`no component for CID ${e}`,i),r=document.createElement("template"),[o,s]=this.recursiveToString(n,i,t);r.innerHTML=o;let a=r.content,l=t&&!t.has(e),[c,d]=Array.from(a.childNodes).reduce(([h,u],m,p)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Dr)?[h,!0]:(m.setAttribute(Dr,e),m.id||(m.id=`${this.parentViewId()}-${e}-${p}`),l&&(m.setAttribute(B9,""),m.innerHTML=""),[!0,u]):m.nodeValue.trim()!==""?(Nn(`only HTML element tags are allowed at the root of components. +`),t.push(n))}),t.forEach(n=>n.remove())}},replaceRootContainer(i,e,t){let n=new Set(["id",cl,M1,j9,P1]);if(i.tagName.toLowerCase()===e.toLowerCase())return Array.from(i.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>i.removeAttribute(r.name)),Object.keys(t).filter(r=>!n.has(r.toLowerCase())).forEach(r=>i.setAttribute(r,t[r])),i;{let r=document.createElement(e);return Object.keys(t).forEach(o=>r.setAttribute(o,t[o])),n.forEach(o=>r.setAttribute(o,i.getAttribute(o))),r.innerHTML=i.innerHTML,i.replaceWith(r),r}},getSticky(i,e,t){let n=(Qr.private(i,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof t=="function"?t():t},deleteSticky(i,e){this.updatePrivate(i,"sticky",[],t=>t.filter(([n,r])=>n!==e))},putSticky(i,e,t){let n=t(i);this.updatePrivate(i,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,t,n]:r.push([e,t,n]),r})},applyStickyOperations(i){let e=Qr.private(i,"sticky");e&&e.forEach(([t,n,r])=>this.putSticky(i,t,n))}},G=Qr,P9=class{static isActive(i,e){let t=e._phxRef===void 0,r=i.getAttribute(H9).split(",").indexOf(Ln.genFileRef(e))>=0;return e.size>0&&(t||r)}static isPreflighted(i,e){return i.getAttribute(W9).split(",").indexOf(Ln.genFileRef(e))>=0&&this.isActive(i,e)}constructor(i,e,t){this.ref=Ln.genFileRef(e),this.fileEl=i,this.file=e,this.view=t,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(wg,this._onElUpdated)}metadata(){return this.meta}progress(i){this._progress=Math.floor(i),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Ln.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(i="failed"){this.fileEl.removeEventListener(wg,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:i}),Ln.clearFiles(this.fileEl)}onDone(i){this._onDone=()=>{this.fileEl.removeEventListener(wg,this._onElUpdated),i()}}onElUpdated(){this.fileEl.getAttribute(H9).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(i){if(this.meta.uploader){let e=i[this.meta.uploader]||Nn(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:Wj}}zipPostFlight(i){this.meta=i.entries[this.ref],this.meta||Nn(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:i})}},jj=0,Ln=class{static genFileRef(i){let e=i._phxRef;return e!==void 0?e:(i._phxRef=(jj++).toString(),i._phxRef)}static getEntryDataURL(i,e,t){let n=this.activeFiles(i).find(r=>this.genFileRef(r)===e);t(URL.createObjectURL(n))}static hasUploadsInProgress(i){let e=0;return G.findUploadInputs(i).forEach(t=>{t.getAttribute(W9)!==t.getAttribute(Ej)&&e++}),e>0}static serializeUploads(i){let e=this.activeFiles(i),t={};return e.forEach(n=>{let r={path:i.name},o=i.getAttribute(gc);t[o]=t[o]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,t[o].push(r)}),t}static clearFiles(i){i.value=null,i.removeAttribute(gc),G.putPrivate(i,"files",[])}static untrackFile(i,e){G.putPrivate(i,"files",G.private(i,"files").filter(t=>!Object.is(t,e)))}static trackFiles(i,e,t){if(i.getAttribute("multiple")!==null){let n=e.filter(r=>!this.activeFiles(i).find(o=>Object.is(o,r)));G.putPrivate(i,"files",this.activeFiles(i).concat(n)),i.value=null}else t&&t.files.length>0&&(i.files=t.files),G.putPrivate(i,"files",e)}static activeFileInputs(i){let e=G.findUploadInputs(i);return Array.from(e).filter(t=>t.files&&this.activeFiles(t).length>0)}static activeFiles(i){return(G.private(i,"files")||[]).filter(e=>P9.isActive(i,e))}static inputsAwaitingPreflight(i){let e=G.findUploadInputs(i);return Array.from(e).filter(t=>this.filesAwaitingPreflight(t).length>0)}static filesAwaitingPreflight(i){return this.activeFiles(i).filter(e=>!P9.isPreflighted(i,e))}constructor(i,e,t){this.view=e,this.onComplete=t,this._entries=Array.from(Ln.filesAwaitingPreflight(i)||[]).map(n=>new P9(i,n,e)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(i,e,t){this._entries=this._entries.map(r=>(r.zipPostFlight(i),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,o)=>{let{name:s,callback:a}=o.uploader(t.uploaders);return r[s]=r[s]||{callback:a,entries:[]},r[s].entries.push(o),r},{});for(let r in n){let{callback:o,entries:s}=n[r];o(s,e,i,t)}}},Vj={focusMain(){let i=document.querySelector("main h1, main, h1");if(i){let e=i.tabIndex;i.tabIndex=-1,i.focus(),i.tabIndex=e}},anyOf(i,e){return e.find(t=>i instanceof t)},isFocusable(i,e){return i instanceof HTMLAnchorElement&&i.rel!=="ignore"||i instanceof HTMLAreaElement&&i.href!==void 0||!i.disabled&&this.anyOf(i,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||i instanceof HTMLIFrameElement||i.tabIndex>0||!e&&i.tabIndex===0&&i.getAttribute("tabindex")!==null&&i.getAttribute("aria-hidden")!=="true"},attemptFocus(i,e){if(this.isFocusable(i,e))try{i.focus()}catch(t){}return!!document.activeElement&&document.activeElement.isSameNode(i)},focusFirstInteractive(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(i){let e=i.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(i){let e=i.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},mh=Vj,zA={LiveFileUpload:{activeRefs(){return this.el.getAttribute(H9)},preflightedRefs(){return this.el.getAttribute(W9)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let i=this.preflightedRefs();this.preflightedWas!==i&&(this.preflightedWas=i,i===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(wg))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(gc)),Ln.getEntryDataURL(this.inputEl,this.ref,i=>{this.url=i,this.el.src=i})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>mh.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>mh.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&mh.focusFirst(this.el)}}},xA=()=>document.documentElement.scrollTop||document.body.scrollTop,V9=()=>window.innerHeight||document.documentElement.clientHeight,Kj=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()},qj=i=>{let e=i.getBoundingClientRect();return e.right>=0&&e.left>=0&&e.bottom<=V9()},EA=i=>{let e=i.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.top<=V9()};zA.InfiniteScroll={mounted(){let i=xA(),e=!1,t=500,n=null,r=this.throttle(t,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"start"})})}),s=this.throttle(t,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,EA(l)||l.scrollIntoView({block:"end"})})});this.onScroll=a=>{let l=xA();if(n)return i=l,n();let c=this.el.getBoundingClientRect(),d=this.el.getAttribute(this.liveSocket.binding("viewport-top")),h=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),u=this.el.lastElementChild,m=this.el.firstElementChild,p=li;p&&d&&!e&&c.top>=0?(e=!0,r(d,m)):f&&e&&c.top<=0&&(e=!1),d&&p&&Kj(m)?o(d,m):h&&f&&qj(u)&&s(h,u),i=l},window.addEventListener("scroll",this.onScroll)},destroyed(){window.removeEventListener("scroll",this.onScroll)},throttle(i,e){let t=0,n;return(...r)=>{let o=Date.now(),s=i-(o-t);s<=0||s>i?(n&&(clearTimeout(n),n=null),t=o,e(...r)):n||(n=setTimeout(()=>{t=Date.now(),n=null,e(...r)},s))}}};var Gj=zA,$j=class{constructor(i,e,t){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(i.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=t,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let i=G.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?ll(document.getElementById(e.previousElementId),t=>{ll(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==t.id||t.insertAdjacentElement("afterend",n)})}):ll(document.getElementById(e.elementId),t=>{t.previousElementSibling==null||i.insertAdjacentElement("afterbegin",t)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{ll(document.getElementById(e),t=>i.insertAdjacentElement("afterbegin",t))})}},TA=11;function Yj(i,e){var t=e.attributes,n,r,o,s,a;if(!(e.nodeType===TA||i.nodeType===TA)){for(var l=t.length-1;l>=0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var vg,Xj="http://www.w3.org/1999/xhtml",or=typeof document=="undefined"?void 0:document,Qj=!!or&&"content"in or.createElement("template"),Jj=!!or&&or.createRange&&"createContextualFragment"in or.createRange();function Zj(i){var e=or.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function eV(i){vg||(vg=or.createRange(),vg.selectNode(or.body));var e=vg.createContextualFragment(i);return e.childNodes[0]}function tV(i){var e=or.createElement("body");return e.innerHTML=i,e.childNodes[0]}function iV(i){return i=i.trim(),Qj?Zj(i):Jj?eV(i):tV(i)}function bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function nV(i,e){return!e||e===Xj?or.createElement(i):or.createElementNS(e,i)}function rV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function F9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var IA={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}F9(i,e,"selected")},INPUT:function(i,e){F9(i,e,"checked"),F9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},D1=1,kA=11,AA=3,LA=8;function sl(){}function oV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function sV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=or.createElement("html"),n.innerHTML=o}else n=iV(n);else n.nodeType===kA&&(n=n.firstElementChild);var s=r.getNodeKey||oV,a=r.onBeforeNodeAdded||sl,l=r.onNodeAdded||sl,c=r.onBeforeElUpdated||sl,d=r.onElUpdated||sl,h=r.onBeforeNodeDiscarded||sl,u=r.onNodeDiscarded||sl,m=r.onBeforeElChildrenUpdated||sl,p=r.skipFromChildren||sl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===D1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===D1||Z.nodeType===kA)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function R(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):R(ee)}else R(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):IA.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,yi,ei,Mt;e:for(;H;){for(ei=H.nextSibling,X=s(H);!V&&U;){if(yi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=ei,U=yi;continue e}Tt=s(U);var ki=U.nodeType,Ot=void 0;if(ki===H.nodeType&&(ki===D1?(X?X!==Tt&&((Mt=b[X])?yi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&bg(U,H),Ot&&q(U,H)):(ki===AA||ki==LA)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=ei,U=yi;continue e}Tt?T(Tt):A(U,Z,!0),U=yi}if(X&&(Mt=b[X])&&bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var zn=a(H);zn!==!1&&(zn&&(H=zn),H.actualize&&(H=H.actualize(Z.ownerDocument||or)),f(Z,H),R(H))}H=ei,U=yi}j(Z,U,Tt);var Cr=IA[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===D1)Oe===D1?bg(t,n)||(u(t),J=rV(t,nV(n.nodeName,n.namespaceURI))):J=n;else if(ke===AA||ke===LA){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe {if(t&&t.isSameNode(n)&&G.isFormInput(n))return G.mergeFocusedInput(n,r),!1}})}constructor(i,e,t,n,r,o){this.view=i,this.liveSocket=i.liveSocket,this.container=e,this.id=t,this.rootID=i.root.id,this.html=n,this.streams=r,this.streamInserts={},this.targetCID=o,this.cidPatch=al(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(i,e){this.callbacks[`before${i}`].push(e)}after(i,e){this.callbacks[`after${i}`].push(e)}trackBefore(i,...e){this.callbacks[`before${i}`].forEach(t=>t(...e))}trackAfter(i,...e){this.callbacks[`after${i}`].forEach(t=>t(...e))}markPrunableContentForRemoval(){let i=this.liveSocket.binding(Ig);G.all(this.container,`[${i}=${N9}]`,e=>e.innerHTML=""),G.all(this.container,`[${i}=append] > *, [${i}=prepend] > *`,e=>{e.setAttribute(hA,"")})}perform(){let{view:i,liveSocket:e,container:t,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):t;if(this.isCIDPatch()&&!r)return;let o=e.getActiveElement(),{selectionStart:s,selectionEnd:a}=o&&G.hasSelectionRange(o)?o:{},l=e.binding(Ig),c=e.binding(Eg),d=e.binding(U9),h=e.binding(PA),u=e.binding(FA),m=e.binding(Tj),p=[],f=[],_=[],b=[],C=null,T=e.time("premorph container prep",()=>this.buildDiffHTML(t,n,l,r));return this.trackBefore("added",t),this.trackBefore("updated",t,t),e.time("morphdom",()=>{this.streams.forEach(([w,A,O,R])=>{Object.entries(A).forEach(([j,[q,_e]])=>{this.streamInserts[j]={ref:w,streamAt:q,limit:_e}}),R!==void 0&&G.all(t,`[${A1}="${w}"]`,j=>{this.removeStreamChildElement(j)}),O.forEach(j=>{let q=t.querySelector(`[id="${j}"]`);q&&this.removeStreamChildElement(q)})}),NA(r,T,{childrenOnly:r.getAttribute(Dr)===null,getNodeKey:w=>G.isPhxDestroyed(w)?null:w.id,skipFromChildren:w=>w.getAttribute(l)===N9,addChild:(w,A)=>{let{ref:O,streamAt:R,limit:j}=this.getStreamInsert(A);if(O===void 0)return w.appendChild(A);if(G.putSticky(A,A1,J=>J.setAttribute(A1,O)),R===0)w.insertAdjacentElement("afterbegin",A);else if(R===-1)w.appendChild(A);else if(R>0){let J=Array.from(w.children)[R];w.insertBefore(A,J)}let q=j!==null&&Array.from(w.children),_e=[];j&&j<0&&q.length>j*-1?_e=q.slice(0,q.length+j):j&&j>=0&&q.length>j&&(_e=q.slice(j)),_e.forEach(J=>{this.streamInserts[J.id]||this.removeStreamChildElement(J)})},onBeforeNodeAdded:w=>(G.maybeAddPrivateHooks(w,h,u),this.trackBefore("added",w),w),onNodeAdded:w=>{w.getAttribute&&this.maybeReOrderStream(w),w instanceof HTMLImageElement&&w.srcset?w.srcset=w.srcset:w instanceof HTMLVideoElement&&w.autoplay&&w.play(),G.isNowTriggerFormExternal(w,m)&&(C=w),w.getAttribute&&w.getAttribute("name")&&G.isFormInput(w)&&f.push(w),(G.isPhxChild(w)&&i.ownsElement(w)||G.isPhxSticky(w)&&i.ownsElement(w.parentNode))&&this.trackAfter("phxChildAdded",w),p.push(w)},onNodeDiscarded:w=>this.onNodeDiscarded(w),onBeforeNodeDiscarded:w=>w.getAttribute&&w.getAttribute(hA)!==null?!0:!(w.parentElement!==null&&w.id&&G.isPhxUpdate(w.parentElement,l,[N9,"append","prepend"])||this.maybePendingRemove(w)||this.skipCIDSibling(w)),onElUpdated:w=>{G.isNowTriggerFormExternal(w,m)&&(C=w),_.push(w),this.maybeReOrderStream(w)},onBeforeElUpdated:(w,A)=>{if(G.maybeAddPrivateHooks(A,h,u),G.cleanChildNodes(A,l),this.skipCIDSibling(A)||G.isPhxSticky(w))return!1;if(G.isIgnored(w,l)||w.form&&w.form.isSameNode(C))return this.trackBefore("updated",w,A),G.mergeAttrs(w,A,{isIgnored:!0}),_.push(w),G.applyStickyOperations(w),!1;if(w.type==="number"&&w.validity&&w.validity.badInput)return!1;if(!G.syncPendingRef(w,A,d))return G.isUploadInput(w)&&(this.trackBefore("updated",w,A),_.push(w)),G.applyStickyOperations(w),!1;if(G.isPhxChild(A)){let R=w.getAttribute(cl);return G.mergeAttrs(w,A,{exclude:[M1]}),R!==""&&w.setAttribute(cl,R),w.setAttribute(P1,this.rootID),G.applyStickyOperations(w),!1}return G.copyPrivates(A,w),o&&w.isSameNode(o)&&G.isFormInput(w)&&w.type!=="hidden"?(this.trackBefore("updated",w,A),G.mergeFocusedInput(w,A),G.syncAttrsToProps(w),_.push(w),G.applyStickyOperations(w),f.push(w),!1):(G.isPhxUpdate(A,l,["append","prepend"])&&b.push(new $j(w,A,A.getAttribute(l))),G.syncAttrsToProps(A),G.applyStickyOperations(A),A.getAttribute("name")&&G.isFormInput(A)&&f.push(A),this.trackBefore("updated",w,A),!0)}})}),e.isDebugEnabled()&&Bj(),b.length>0&&e.time("post-morph append/prepend restoration",()=>{b.forEach(w=>w.perform())}),f.forEach(w=>{G.maybeHideFeedback(r,w,c)}),e.silenceEvents(()=>G.restoreFocus(o,s,a)),G.dispatchEvent(document,"phx:update"),p.forEach(w=>this.trackAfter("added",w)),_.forEach(w=>this.trackAfter("updated",w)),this.transitionPendingRemoves(),C&&(e.unload(),C.submit()),!0}onNodeDiscarded(i){(G.isPhxChild(i)||G.isPhxSticky(i))&&this.liveSocket.destroyViewByEl(i),this.trackAfter("discarded",i)}maybePendingRemove(i){return i.getAttribute&&i.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(i),!0):!1}removeStreamChildElement(i){this.maybePendingRemove(i)||(i.remove(),this.onNodeDiscarded(i))}getStreamInsert(i){return(i.id?this.streamInserts[i.id]:{})||{}}maybeReOrderStream(i){let{ref:e,streamAt:t,limit:n}=this.getStreamInsert(i);if(t!==void 0){if(G.putSticky(i,A1,r=>r.setAttribute(A1,e)),t===0)i.parentElement.insertBefore(i,i.parentElement.firstElementChild);else if(t>0){let r=Array.from(i.parentElement.children),o=r.indexOf(i);if(t>=r.length-1)i.parentElement.appendChild(i);else{let s=r[t];o>t?i.parentElement.insertBefore(i,s):i.parentElement.insertBefore(i,s.nextElementSibling)}}}}transitionPendingRemoves(){let{pendingRemoves:i,liveSocket:e}=this;i.length>0&&(e.transitionRemoves(i),e.requestDOMUpdate(()=>{i.forEach(t=>{let n=G.firstPhxChild(t);n&&e.destroyViewByEl(n),t.remove()}),this.trackAfter("transitionsDiscarded",i)}))}isCIDPatch(){return this.cidPatch}skipCIDSibling(i){return i.nodeType===Node.ELEMENT_NODE&&i.getAttribute(B9)!==null}targetCIDContainer(i){if(!this.isCIDPatch())return;let[e,...t]=G.findComponentNodeList(this.container,this.targetCID);return t.length===0&&G.childNodeLength(i)===1?e:e&&e.parentNode}buildDiffHTML(i,e,t,n){let r=this.isCIDPatch(),o=r&&n.getAttribute(Dr)===this.targetCID.toString();if(!r||o)return e;{let s=null,a=document.createElement("template");s=G.cloneNode(n);let[l,...c]=G.findComponentNodeList(s,this.targetCID);return a.innerHTML=e,c.forEach(d=>d.remove()),Array.from(s.childNodes).forEach(d=>{d.id&&d.nodeType===Node.ELEMENT_NODE&&d.getAttribute(Dr)!==this.targetCID.toString()&&(d.setAttribute(B9,""),d.innerHTML="")}),Array.from(a.content.childNodes).forEach(d=>s.insertBefore(d,l)),l.remove(),s.outerHTML}}indexOf(i,e){return Array.from(i.children).indexOf(e)}},DA=class{static extract(i){let{[yA]:e,[bA]:t,[SA]:n}=i;return delete i[yA],delete i[bA],delete i[SA],{diff:i,title:n,reply:e||null,events:t||[]}}constructor(i,e){this.viewId=i,this.rendered={},this.mergeDiff(e)}parentViewId(){return this.viewId}toString(i){let[e,t]=this.recursiveToString(this.rendered,this.rendered[Nr],i);return[e,t]}recursiveToString(i,e=i[Nr],t){t=t?new Set(t):null;let n={buffer:"",components:e,onlyCids:t,streams:new Set};return this.toOutputBuffer(i,null,n),[n.buffer,n.streams]}componentCIDs(i){return Object.keys(i[Nr]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(i){return i[Nr]?Object.keys(i).length===1:!1}getComponent(i,e){return i[Nr][e]}mergeDiff(i){let e=i[Nr],t={};if(delete i[Nr],this.rendered=this.mutableMerge(this.rendered,i),this.rendered[Nr]=this.rendered[Nr]||{},e){let n=this.rendered[Nr];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,t);for(let r in e)n[r]=e[r];i[Nr]=e}}cachedFindComponent(i,e,t,n,r){if(r[i])return r[i];{let o,s,a=e[ns];if(al(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],t,n,r):l=t[-a],s=l[ns],o=this.cloneMerge(l,e),o[ns]=s}else o=e[ns]!==void 0?e:this.cloneMerge(t[i]||{},e);return r[i]=o,o}}mutableMerge(i,e){return e[ns]!==void 0?e:(this.doMutableMerge(i,e),i)}doMutableMerge(i,e){for(let t in e){let n=e[t],r=i[t];N1(n)&&n[ns]===void 0&&N1(r)?this.doMutableMerge(r,n):i[t]=n}}cloneMerge(i,e){let t=me(me({},i),e);for(let n in t){let r=e[n],o=i[n];N1(r)&&r[ns]===void 0&&N1(o)&&(t[n]=this.cloneMerge(o,r))}return t}componentToString(i){let[e,t]=this.recursiveCIDToString(this.rendered[Nr],i);return[e,t]}pruneCIDs(i){i.forEach(e=>delete this.rendered[Nr][e])}get(){return this.rendered}isNewFingerprint(i={}){return!!i[ns]}templateStatic(i,e){return typeof i=="number"?e[i]:i}toOutputBuffer(i,e,t){if(i[M9])return this.comprehensionToBuffer(i,e,t);let{[ns]:n}=i;n=this.templateStatic(n,e),t.buffer+=n[0];for(let r=1;r 0||l.length>0||c)&&(delete i[CA],t.streams.add(o))}dynamicToBuffer(i,e,t){if(typeof i=="number"){let[n,r]=this.recursiveCIDToString(t.components,i,t.onlyCids);t.buffer+=n,t.streams=new Set([...t.streams,...r])}else N1(i)?this.toOutputBuffer(i,e,t):t.buffer+=i}recursiveCIDToString(i,e,t){let n=i[e]||Nn(`no component for CID ${e}`,i),r=document.createElement("template"),[o,s]=this.recursiveToString(n,i,t);r.innerHTML=o;let a=r.content,l=t&&!t.has(e),[c,d]=Array.from(a.childNodes).reduce(([h,u],m,p)=>m.nodeType===Node.ELEMENT_NODE?m.getAttribute(Dr)?[h,!0]:(m.setAttribute(Dr,e),m.id||(m.id=`${this.parentViewId()}-${e}-${p}`),l&&(m.setAttribute(B9,""),m.innerHTML=""),[!0,u]):m.nodeValue.trim()!==""?(Nn(`only HTML element tags are allowed at the root of components. got: "${m.nodeValue.trim()}" within: `,r.innerHTML.trim()),m.replaceWith(this.createSpan(m.nodeValue,e)),[!0,u]):(m.remove(),[h,u]),[!1,!1]);return!c&&!d?(Nn(`expected at least one HTML element tag inside a component, but the component is empty: -`,r.innerHTML.trim()),[this.createSpan("",e).outerHTML,s]):!c&&d?(Nn("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",r.innerHTML.trim()),[r.innerHTML,s]):[r.innerHTML,s]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Dr,e),t}},lV=1,R1=class{static makeID(){return lV++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,n=>n.dispatchUploads(e,t))}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Sg=null,cV={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?$.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,$.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:h,dispatcher:u,callback:m}=o,p={loading:d,value:h,target:l,page_loading:!!c},f=i==="change"&&u?u:n,_=l||f.getAttribute(t.binding("target"))||f;t.withinTargets(_,(b,C)=>{if(i==="change"){let{newCid:T,_target:w}=o;w=w||($.isFormInput(n)?n.name:void 0),w&&(p._target=w),b.pushInput(n,C,T,s||e,p,m)}else if(i==="submit"){let{submitter:T}=o;b.submitForm(n,C,s||e,T,p,m)}else b.pushEvent(i,n,C,s||e,a,p,m)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>mh.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>mh.focusFirstInteractive(r)||mh.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Sg=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Sg&&Sg.focus(),Sg=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,h,u]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let m=()=>{this.addOrRemoveClasses(t,h,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,u,h))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],d.concat(u)),$.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let m=()=>{this.addOrRemoveClasses(t,l,d.concat(h).concat(u));let p=n||this.defaultDisplay(t);$.putSticky(t,"toggle",f=>f.style.display=p),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),$.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let m=n||this.defaultDisplay(t);$.putSticky(t,"toggle",p=>p.style.display=m),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>this.addOrRemoveClasses(i,a.concat(s),[]),d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=$.getSticky(i,"classes",[[],[]]),h=e.filter(f=>c.indexOf(f)<0&&!i.classList.contains(f)),u=t.filter(f=>d.indexOf(f)<0&&i.classList.contains(f)),m=c.filter(f=>t.indexOf(f)<0).concat(h),p=d.filter(f=>e.indexOf(f)<0).concat(u);$.putSticky(i,"classes",f=>(f.classList.remove(...p),f.classList.add(...m),[m,p]))})},setOrRemoveAttrs(i,e,t){let[n,r]=$.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);$.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?$.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},vo=cV,Cg=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=Ho(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,h)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},UA=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}))}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(j9)}connectParams(i){let e=this.liveSocket.params(this.el),t=$.all(document,`[${this.binding(wj)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(cl)}getStatic(){let i=this.el.getAttribute(M1);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};$.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(mA,I1,mg,pA,A9),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(I1)}}execAll(i){$.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(mA),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(al(i))$.findComponentNodeList(this.el,i).length===0?Nn(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Nn(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",xg(e)]);let{diff:n,reply:r,events:o,title:s}=DA.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>$.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=$.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,rs.dropLocal(this.liveSocket.localStorage,window.location.pathname,RA),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new DA(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],h)=>{this.pushFormRecovery(l,d,u=>{h===a.length-1&&this.onJoinComplete(u,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){$.all(document,`[${fc}="${this.id}"][${Jr}]`,i=>{i.removeAttribute(Jr),i.removeAttribute(fc)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);$.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(M1);return a&&o.setAttribute(M1,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=$.byId(this.id),this.el.setAttribute(P1,this.root.id)}execNewMounted(){let i=this.binding(PA),e=this.binding(FA);$.all(this.el,`[${i}], [${e}]`,t=>{$.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),$.all(this.el,`[${this.binding(k1)}], [data-phx-${k1}]`,t=>{this.maybeAddNewHook(t)}),$.all(this.el,`[${this.binding(_A)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new yg(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&$.isIgnored(i,this.binding(Ig));if(t&&!i.isEqualNode(e)&&!(n&&Uj(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(_A)),t=e&&$.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),$.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{$.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=$.all(n,`[${Dr}]`),o=$.all(n,`[${this.binding(k1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);al(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){$.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(uh)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new UA(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{$.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):wA(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new yg(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}${t}>`,o]})}componentPatch(i,e){if(wA(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new yg(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[R1.elementID(i)]}addHook(i){if(R1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${k1}`)||i.getAttribute(this.binding(k1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Nn(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new R1(this,i,t);return this.viewHooks[R1.elementID(n.el)]=n,n}else e!==null&&Nn(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[R1.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload")return this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.onRedirect({to:this.href});if(i.reason==="unauthorized"||i.reason==="stale")return this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.onRedirect({to:this.href});if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([I1,mg,A9]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(Rj)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([I1,mg,A9]):this.displayError([I1,mg,pA]))}displayError(i){this.isMain()&&$.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(uA))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,Oj).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:h,events:u})=>{r!==null&&this.undoRefs(r),this.update(d,u),c(h)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&$.all(document,`[${fc}="${this.id}"][${Jr}="${i}"]`,e=>{let t=e.getAttribute(pg);e.removeAttribute(Jr),e.removeAttribute(fc),e.getAttribute(L9)!==null&&(e.readOnly=!1,e.removeAttribute(L9)),t!==null&&(e.disabled=t==="true",e.removeAttribute(pg)),MA.forEach(o=>$.removeClass(e,o));let n=e.getAttribute(fg);n!==null&&(e.innerText=n,e.removeAttribute(fg));let r=$.private(e,Jr);if(r){let o=this.triggerBeforeUpdateHook(e,r);yg.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),$.deletePrivate(e,Jr)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(U9);return t.loading&&(i=i.concat($.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(Jr,n),o.setAttribute(fc,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(fg)||o.setAttribute(fg,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Dr);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(al(e))return e;let n=i.getAttribute(this.binding("target"));return al(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return al(i)?i:i?ll(i.closest(`[${Dr}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r =0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(Nj)),ref:i.getAttribute(gc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=al(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=Cg(i.form,me({_target:r._target},d),[i.name]):c=Cg(i.form,me({_target:r._target},d)),$.isUploadInput(i)&&i.files&&i.files.length>0&&Ln.trackFiles(i,Array.from(i.files)),s=Ln.serializeUploads(i);let h={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",h,u=>{if($.showError(i,this.liveSocket.binding(Eg)),$.isUploadInput(i)&&i.getAttribute("data-phx-auto-upload")!==null){if(Ln.filesAwaitingPreflight(i).length>0){let[m,p]=l();this.uploadFiles(i.form,e,m,a,f=>{o&&o(u),this.triggerAwaitingSubmit(i.form)})}}else o&&o(u)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(O1(d,`${this.binding(Ig)}=ignore`,d.form)||O1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(U9)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(pg,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(L9,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(pg,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(uA),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(Ln.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(Ln.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,h=>{let u=this.extractMeta(i),m=Cg(i,me({submitter:n},u));this.pushWithReply(d,"event",{type:"form",event:t,value:m,cid:a},o)})}else if(!(i.hasAttribute(Jr)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Cg(i,me({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=Ln.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new Ln(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(u=>u.toPreflightPayload()),h={ref:l.getAttribute(gc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",h]),this.pushWithReply(null,"allow_upload",h,u=>{if(this.log("upload",()=>["got preflight response",u]),u.error){this.undoRefs(t);let[m,p]=u.error;this.log("upload",()=>[`error for entry ${m}`,p])}else{let m=p=>{this.channel.onError(()=>{this.joinCount===o&&p()})};c.initAdapterUpload(u,m,this.liveSocket)}})})}dispatchUploads(i,e){let t=$.findUploadInputs(this.el).filter(n=>n.name===i);t.length===0?Nn(`no live file inputs found matching the name "${i}"`):t.length>1?Nn(`duplicate live file inputs found matching the name "${i}"`):$.dispatchEvent(t[0],OA,{detail:{files:e}})}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>$.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;let a=s.find(c=>c.type!=="hidden")||a[0],l=i.getAttribute(this.binding(gA))||i.getAttribute(this.binding("change"));vo.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=this.pushWithReply(r,"live_patch",{url:i},a=>{this.liveSocket.requestDOMUpdate(()=>{a.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});s?s.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,$.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(gA))!=="ignore").map(n=>{let r=t.content.querySelector(`form[id="${n.id}"][${e}="${n.getAttribute(e)}"]`);return r?[n,r,this.targetComponentID(r)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>$.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>$.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(ph);return i.getAttribute(uh)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){$.putPrivate(i,Tg,!0);let o=this.liveSocket.binding(Eg),s=Array.from(i.elements);s.forEach(a=>$.putPrivate(a,Tg,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>$.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},WA=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` +`,r.innerHTML.trim()),[this.createSpan("",e).outerHTML,s]):!c&&d?(Nn("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",r.innerHTML.trim()),[r.innerHTML,s]):[r.innerHTML,s]}createSpan(i,e){let t=document.createElement("span");return t.innerText=i,t.setAttribute(Dr,e),t}},lV=1,R1=class{static makeID(){return lV++}static elementID(i){return i.phxHookId}constructor(i,e,t){this.__view=i,this.liveSocket=i.liveSocket,this.__callbacks=t,this.__listeners=new Set,this.__isDisconnected=!1,this.el=e,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(i,e={},t=function(){}){return this.__view.pushHookEvent(this.el,null,i,e,t)}pushEventTo(i,e,t={},n=function(){}){return this.__view.withinTargets(i,(r,o)=>r.pushHookEvent(this.el,o,e,t,n))}handleEvent(i,e){let t=(n,r)=>r?i:e(n.detail);return window.addEventListener(`phx:${i}`,t),this.__listeners.add(t),t}removeHandleEvent(i){let e=i(null,!0);window.removeEventListener(`phx:${e}`,i),this.__listeners.delete(i)}upload(i,e){return this.__view.dispatchUploads(i,e)}uploadTo(i,e,t){return this.__view.withinTargets(i,n=>n.dispatchUploads(e,t))}__cleanup__(){this.__listeners.forEach(i=>this.removeHandleEvent(i))}},Sg=null,cV={exec(i,e,t,n,r){let[o,s]=r||[null,{callback:r&&r.callback}];(e.charAt(0)==="["?JSON.parse(e):[[o,s]]).forEach(([l,c])=>{l===o&&s.data&&(c.data=Object.assign(c.data||{},s.data),c.callback=c.callback||s.callback),this.filterToEls(n,c).forEach(d=>{this[`exec_${l}`](i,e,t,n,d,c)})})},isVisible(i){return!!(i.offsetWidth||i.offsetHeight||i.getClientRects().length>0)},exec_exec(i,e,t,n,r,[o,s]){(s?G.all(document,s):[n]).forEach(l=>{let c=l.getAttribute(o);if(!c)throw new Error(`expected ${o} to contain JS command on "${s}"`);t.liveSocket.execJS(l,c,i)})},exec_dispatch(i,e,t,n,r,{to:o,event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,G.dispatchEvent(r,s,{detail:a,bubbles:l})},exec_push(i,e,t,n,r,o){if(!t.isConnected())return;let{event:s,data:a,target:l,page_loading:c,loading:d,value:h,dispatcher:u,callback:m}=o,p={loading:d,value:h,target:l,page_loading:!!c},f=i==="change"&&u?u:n,_=l||f.getAttribute(t.binding("target"))||f;t.withinTargets(_,(b,C)=>{if(i==="change"){let{newCid:T,_target:w}=o;w=w||(G.isFormInput(n)?n.name:void 0),w&&(p._target=w),b.pushInput(n,C,T,s||e,p,m)}else if(i==="submit"){let{submitter:T}=o;b.submitForm(n,C,s||e,T,p,m)}else b.pushEvent(i,n,C,s||e,a,p,m)})},exec_navigate(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.historyRedirect(o,s?"replace":"push")},exec_patch(i,e,t,n,r,{href:o,replace:s}){t.liveSocket.pushHistoryPatch(o,s?"replace":"push",n)},exec_focus(i,e,t,n,r){window.requestAnimationFrame(()=>mh.attemptFocus(r))},exec_focus_first(i,e,t,n,r){window.requestAnimationFrame(()=>mh.focusFirstInteractive(r)||mh.focusFirst(r))},exec_push_focus(i,e,t,n,r){window.requestAnimationFrame(()=>Sg=r||n)},exec_pop_focus(i,e,t,n,r){window.requestAnimationFrame(()=>{Sg&&Sg.focus(),Sg=null})},exec_add_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,o,[],s,a,t)},exec_remove_class(i,e,t,n,r,{names:o,transition:s,time:a}){this.addOrRemoveClasses(r,[],o,s,a,t)},exec_transition(i,e,t,n,r,{time:o,transition:s}){this.addOrRemoveClasses(r,[],[],s,o,t)},exec_toggle(i,e,t,n,r,{display:o,ins:s,outs:a,time:l}){this.toggle(i,t,r,o,s,a,l)},exec_show(i,e,t,n,r,{display:o,transition:s,time:a}){this.show(i,t,r,o,s,a)},exec_hide(i,e,t,n,r,{display:o,transition:s,time:a}){this.hide(i,t,r,o,s,a)},exec_set_attr(i,e,t,n,r,{attr:[o,s]}){this.setOrRemoveAttrs(r,[[o,s]],[])},exec_remove_attr(i,e,t,n,r,{attr:o}){this.setOrRemoveAttrs(r,[],[o])},show(i,e,t,n,r,o){this.isVisible(t)||this.toggle(i,e,t,n,r,null,o)},hide(i,e,t,n,r,o){this.isVisible(t)&&this.toggle(i,e,t,n,null,r,o)},toggle(i,e,t,n,r,o,s){let[a,l,c]=r||[[],[],[]],[d,h,u]=o||[[],[],[]];if(a.length>0||d.length>0)if(this.isVisible(t)){let m=()=>{this.addOrRemoveClasses(t,h,a.concat(l).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,u,h))})};t.dispatchEvent(new Event("phx:hide-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],d.concat(u)),G.putSticky(t,"toggle",p=>p.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))})}else{if(i==="remove")return;let m=()=>{this.addOrRemoveClasses(t,l,d.concat(h).concat(u));let p=n||this.defaultDisplay(t);G.putSticky(t,"toggle",f=>f.style.display=p),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})};t.dispatchEvent(new Event("phx:show-start")),e.transition(s,m,()=>{this.addOrRemoveClasses(t,[],a.concat(c)),t.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(t)?window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:hide-start")),G.putSticky(t,"toggle",m=>m.style.display="none"),t.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{t.dispatchEvent(new Event("phx:show-start"));let m=n||this.defaultDisplay(t);G.putSticky(t,"toggle",p=>p.style.display=m),t.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(i,e,t,n,r,o){let[s,a,l]=n||[[],[],[]];if(s.length>0){let c=()=>this.addOrRemoveClasses(i,a.concat(s),[]),d=()=>this.addOrRemoveClasses(i,e.concat(l),t.concat(s).concat(a));return o.transition(r,c,d)}window.requestAnimationFrame(()=>{let[c,d]=G.getSticky(i,"classes",[[],[]]),h=e.filter(f=>c.indexOf(f)<0&&!i.classList.contains(f)),u=t.filter(f=>d.indexOf(f)<0&&i.classList.contains(f)),m=c.filter(f=>t.indexOf(f)<0).concat(h),p=d.filter(f=>e.indexOf(f)<0).concat(u);G.putSticky(i,"classes",f=>(f.classList.remove(...p),f.classList.add(...m),[m,p]))})},setOrRemoveAttrs(i,e,t){let[n,r]=G.getSticky(i,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(t),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(t);G.putSticky(i,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,d])=>l.setAttribute(c,d)),[s,a]))},hasAllClasses(i,e){return e.every(t=>i.classList.contains(t))},isToggledOut(i,e){return!this.isVisible(i)||this.hasAllClasses(i,e)},filterToEls(i,{to:e}){return e?G.all(document,e):[i]},defaultDisplay(i){return{tr:"table-row",td:"table-cell"}[i.tagName.toLowerCase()]||"block"}},vo=cV,Cg=(i,e,t=[])=>{let l=e,{submitter:n}=l,r=Ho(l,["submitter"]),o=new FormData(i);n&&n.hasAttribute("name")&&n.form&&n.form===i&&o.append(n.name,n.value);let s=[];o.forEach((c,d,h)=>{c instanceof File&&s.push(d)}),s.forEach(c=>o.delete(c));let a=new URLSearchParams;for(let[c,d]of o.entries())(t.length===0||t.indexOf(c)>=0)&&a.append(c,d);for(let c in r)a.append(c,r[c]);return a.toString()},UA=class{constructor(i,e,t,n,r){this.isDead=!1,this.liveSocket=e,this.flash=n,this.parent=t,this.root=t?t.root:this,this.el=i,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(o){o&&o()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}))}setHref(i){this.href=i}setRedirect(i){this.redirect=!0,this.href=i}isMain(){return this.el.hasAttribute(j9)}connectParams(i){let e=this.liveSocket.params(this.el),t=G.all(document,`[${this.binding(wj)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e._live_referer=i,e}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(cl)}getStatic(){let i=this.el.getAttribute(M1);return i===""?null:i}destroy(i=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let e=()=>{i();for(let t in this.viewHooks)this.destroyHook(this.viewHooks[t])};G.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",e).receive("error",e).receive("timeout",e)}setContainerClasses(...i){this.el.classList.remove(mA,I1,mg,pA,A9),this.el.classList.add(...i)}showLoader(i){if(clearTimeout(this.loaderTimer),i)this.loaderTimer=setTimeout(()=>this.showLoader(),i);else{for(let e in this.viewHooks)this.viewHooks[e].__disconnected();this.setContainerClasses(I1)}}execAll(i){G.all(this.el,`[${i}]`,e=>this.liveSocket.execJS(e,e.getAttribute(i)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(mA),this.execAll(this.binding("connected"))}triggerReconnected(){for(let i in this.viewHooks)this.viewHooks[i].__reconnected()}log(i,e){this.liveSocket.log(this,i,e)}transition(i,e,t=function(){}){this.liveSocket.transition(i,e,t)}withinTargets(i,e){if(i instanceof HTMLElement||i instanceof SVGElement)return this.liveSocket.owner(i,t=>e(t,i));if(al(i))G.findComponentNodeList(this.el,i).length===0?Nn(`no component found matching phx-target of ${i}`):e(this,parseInt(i));else{let t=Array.from(document.querySelectorAll(i));t.length===0&&Nn(`nothing found matching the phx-target selector "${i}"`),t.forEach(n=>this.liveSocket.owner(n,r=>e(r,n)))}}applyDiff(i,e,t){this.log(i,()=>["",xg(e)]);let{diff:n,reply:r,events:o,title:s}=DA.extract(e);t({diff:n,reply:r,events:o}),s&&window.requestAnimationFrame(()=>G.putTitle(s))}onJoin(i){let{rendered:e,container:t}=i;if(t){let[n,r]=t;this.el=G.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,rs.dropLocal(this.liveSocket.localStorage,window.location.pathname,RA),this.applyDiff("mount",e,({diff:n,events:r})=>{this.rendered=new DA(this.id,n);let[o,s]=this.renderContainer(null,"join");this.dropPendingRefs();let a=this.formsForRecovery(o);this.joinCount++,a.length>0?a.forEach(([l,c,d],h)=>{this.pushFormRecovery(l,d,u=>{h===a.length-1&&this.onJoinComplete(u,o,s,r)})}):this.onJoinComplete(i,o,s,r)})}dropPendingRefs(){G.all(document,`[${fc}="${this.id}"][${Jr}]`,i=>{i.removeAttribute(Jr),i.removeAttribute(fc)})}onJoinComplete({live_patch:i},e,t,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(i,e,t,n);G.findPhxChildrenInFragment(e,this.id).filter(o=>{let s=o.id&&this.el.querySelector(`[id="${o.id}"]`),a=s&&s.getAttribute(M1);return a&&o.setAttribute(M1,a),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(i,e,t,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(i,e,t,n)])}attachTrueDocEl(){this.el=G.byId(this.id),this.el.setAttribute(P1,this.root.id)}execNewMounted(){let i=this.binding(PA),e=this.binding(FA);G.all(this.el,`[${i}], [${e}]`,t=>{G.maybeAddPrivateHooks(t,i,e),this.maybeAddNewHook(t)}),G.all(this.el,`[${this.binding(k1)}], [data-phx-${k1}]`,t=>{this.maybeAddNewHook(t)}),G.all(this.el,`[${this.binding(_A)}]`,t=>this.maybeMounted(t))}applyJoinPatch(i,e,t,n){this.attachTrueDocEl();let r=new yg(this,this.el,this.id,e,t,null);if(r.markPrunableContentForRemoval(),this.performPatch(r,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),i){let{kind:o,to:s}=i;this.liveSocket.historyPatch(s,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(i,e){this.liveSocket.triggerDOM("onBeforeElUpdated",[i,e]);let t=this.getHook(i),n=t&&G.isIgnored(i,this.binding(Ig));if(t&&!i.isEqualNode(e)&&!(n&&Uj(i.dataset,e.dataset)))return t.__beforeUpdate(),t}maybeMounted(i){let e=i.getAttribute(this.binding(_A)),t=e&&G.private(i,"mounted");e&&!t&&(this.liveSocket.execJS(i,e),G.putPrivate(i,"mounted",!0))}maybeAddNewHook(i,e){let t=this.addHook(i);t&&t.__mounted()}performPatch(i,e){let t=[],n=!1,r=new Set;return i.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),i.after("phxChildAdded",o=>{G.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),i.before("updated",(o,s)=>{this.triggerBeforeUpdateHook(o,s)&&r.add(o.id)}),i.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),i.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&t.push(o)}),i.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,e)),i.perform(),this.afterElementsRemoved(t,e),n}afterElementsRemoved(i,e){let t=[];i.forEach(n=>{let r=G.all(n,`[${Dr}]`),o=G.all(n,`[${this.binding(k1)}]`);r.concat(n).forEach(s=>{let a=this.componentID(s);al(a)&&t.indexOf(a)===-1&&t.push(a)}),o.concat(n).forEach(s=>{let a=this.getHook(s);a&&this.destroyHook(a)})}),e&&this.maybePushComponentsDestroyed(t)}joinNewChildren(){G.findPhxChildren(this.el,this.id).forEach(i=>this.joinChild(i))}getChildById(i){return this.root.children[this.id][i]}getDescendentByEl(i){return i.id===this.id?this:this.children[i.getAttribute(uh)][i.id]}destroyDescendent(i){for(let e in this.root.children)for(let t in this.root.children[e])if(t===i)return this.root.children[e][t].destroy()}joinChild(i){if(!this.getChildById(i.id)){let t=new UA(i,this.liveSocket,this);return this.root.children[this.id][t.id]=t,t.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(i){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([i,e])=>{i.isDestroyed()||e()}),this.pendingJoinOps=[]})}update(i,e){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:i,events:e});this.rendered.mergeDiff(i);let t=!1;this.rendered.isComponentOnlyDiff(i)?this.liveSocket.time("component patch complete",()=>{G.findParentCIDs(this.el,this.rendered.componentCIDs(i)).forEach(r=>{this.componentPatch(this.rendered.getComponent(i,r),r)&&(t=!0)})}):wA(i)||this.liveSocket.time("full patch complete",()=>{let[n,r]=this.renderContainer(i,"update"),o=new yg(this,this.el,this.id,n,r,null);t=this.performPatch(o,!0)}),this.liveSocket.dispatchEvents(e),t&&this.joinNewChildren()}renderContainer(i,e){return this.liveSocket.time(`toString diff (${e})`,()=>{let t=this.el.tagName,n=i?this.rendered.componentCIDs(i).concat(this.pruningCIDs):null,[r,o]=this.rendered.toString(n);return[`<${t}>${r}${t}>`,o]})}componentPatch(i,e){if(wA(i))return!1;let[t,n]=this.rendered.componentToString(e),r=new yg(this,this.el,this.id,t,n,e);return this.performPatch(r,!0)}getHook(i){return this.viewHooks[R1.elementID(i)]}addHook(i){if(R1.elementID(i)||!i.getAttribute)return;let e=i.getAttribute(`data-phx-${k1}`)||i.getAttribute(this.binding(k1));if(e&&!this.ownsElement(i))return;let t=this.liveSocket.getHookCallbacks(e);if(t){i.id||Nn(`no DOM ID for hook "${e}". Hooks require a unique ID on each element.`,i);let n=new R1(this,i,t);return this.viewHooks[R1.elementID(n.el)]=n,n}else e!==null&&Nn(`unknown hook found for "${e}"`,i)}destroyHook(i){i.__destroyed(),i.__cleanup__(),delete this.viewHooks[R1.elementID(i.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:i,events:e})=>this.update(i,e)),this.pendingDiffs=[],this.eachChild(i=>i.applyPendingUpdates())}eachChild(i){let e=this.root.children[this.id]||{};for(let t in e)i(this.getChildById(t))}onChannel(i,e){this.liveSocket.onChannel(this.channel,i,t=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>e(t)]):this.liveSocket.requestDOMUpdate(()=>e(t))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",i=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",i,({diff:e,events:t})=>this.update(e,t))})}),this.onChannel("redirect",({to:i,flash:e})=>this.onRedirect({to:i,flash:e})),this.onChannel("live_patch",i=>this.onLivePatch(i)),this.onChannel("live_redirect",i=>this.onLiveRedirect(i)),this.channel.onError(i=>this.onError(i)),this.channel.onClose(i=>this.onClose(i))}destroyAllChildren(){this.eachChild(i=>i.destroy())}onLiveRedirect(i){let{to:e,kind:t,flash:n}=i,r=this.expandURL(e);this.liveSocket.historyRedirect(r,t,n)}onLivePatch(i){let{to:e,kind:t}=i;this.href=this.expandURL(e),this.liveSocket.historyPatch(e,t)}expandURL(i){return i.startsWith("/")?`${window.location.protocol}//${window.location.host}${i}`:i}onRedirect({to:i,flash:e}){this.liveSocket.redirect(i,e)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(i){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=e=>{e=e||function(){},i?i(this.joinCount,e):e()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",e=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(e))}).receive("error",e=>!this.isDestroyed()&&this.onJoinError(e)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(i){if(i.reason==="reload")return this.log("error",()=>[`failed mount with ${i.status}. Falling back to page request`,i]),this.onRedirect({to:this.href});if(i.reason==="unauthorized"||i.reason==="stale")return this.log("error",()=>["unauthorized live_redirect. Falling back to page request",i]),this.onRedirect({to:this.href});if((i.redirect||i.live_redirect)&&(this.joinPending=!1,this.channel.leave()),i.redirect)return this.onRedirect(i.redirect);if(i.live_redirect)return this.onLiveRedirect(i.live_redirect);this.displayError([I1,mg,A9]),this.log("error",()=>["unable to join",i]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(i){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&i!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(Rj)}}onError(i){this.onClose(i),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",i]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([I1,mg,A9]):this.displayError([I1,mg,pA]))}displayError(i){this.isMain()&&G.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...i),this.execAll(this.binding("disconnected"))}pushWithReply(i,e,t,n=function(){}){if(!this.isConnected())return;let[r,[o],s]=i?i():[null,[],{}],a=function(){};return(s.page_loading||o&&o.getAttribute(this.binding(uA))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof t.cid!="number"&&delete t.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(e,t,Oj).receive("ok",l=>{let c=d=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),n(l,d)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:d,reply:h,events:u})=>{r!==null&&this.undoRefs(r),this.update(d,u),c(h)})}):(r!==null&&this.undoRefs(r),c(null))}))}undoRefs(i){this.isConnected()&&G.all(document,`[${fc}="${this.id}"][${Jr}="${i}"]`,e=>{let t=e.getAttribute(pg);e.removeAttribute(Jr),e.removeAttribute(fc),e.getAttribute(L9)!==null&&(e.readOnly=!1,e.removeAttribute(L9)),t!==null&&(e.disabled=t==="true",e.removeAttribute(pg)),MA.forEach(o=>G.removeClass(e,o));let n=e.getAttribute(fg);n!==null&&(e.innerText=n,e.removeAttribute(fg));let r=G.private(e,Jr);if(r){let o=this.triggerBeforeUpdateHook(e,r);yg.patchEl(e,r,this.liveSocket.getActiveElement()),o&&o.__updated(),G.deletePrivate(e,Jr)}})}putRef(i,e,t={}){let n=this.ref++,r=this.binding(U9);return t.loading&&(i=i.concat(G.all(document,t.loading))),i.forEach(o=>{o.classList.add(`phx-${e}-loading`),o.setAttribute(Jr,n),o.setAttribute(fc,this.el.id);let s=o.getAttribute(r);s!==null&&(o.getAttribute(fg)||o.setAttribute(fg,o.innerText),s!==""&&(o.innerText=s),o.setAttribute("disabled",""))}),[n,i,t]}componentID(i){let e=i.getAttribute&&i.getAttribute(Dr);return e?parseInt(e):null}targetComponentID(i,e,t={}){if(al(e))return e;let n=i.getAttribute(this.binding("target"));return al(n)?parseInt(n):e&&(n!==null||t.target)?this.closestComponentID(e):null}closestComponentID(i){return al(i)?i:i?ll(i.closest(`[${Dr}]`),e=>this.ownsElement(e)&&this.componentID(e)):null}pushHookEvent(i,e,t,n,r){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,n]),!1;let[o,s,a]=this.putRef([i],"hook");return this.pushWithReply(()=>[o,s,a],"event",{type:"hook",event:t,value:n,cid:this.closestComponentID(e)},(l,c)=>r(c,o)),o}extractMeta(i,e,t){let n=this.binding("value-");for(let r=0;r =0&&!i.checked&&delete e.value),t){e||(e={});for(let r in t)e[r]=t[r]}return e}pushEvent(i,e,t,n,r,o={},s){this.pushWithReply(()=>this.putRef([e],i,o),"event",{type:i,event:n,value:this.extractMeta(e,r,o.value),cid:this.targetComponentID(e,t,o)},(a,l)=>s&&s(l))}pushFileProgress(i,e,t,n=function(){}){this.liveSocket.withinOwners(i.form,(r,o)=>{r.pushWithReply(null,"progress",{event:i.getAttribute(r.binding(Nj)),ref:i.getAttribute(gc),entry_ref:e,progress:t,cid:r.targetComponentID(i.form,o)},n)})}pushInput(i,e,t,n,r,o){let s,a=al(t)?t:this.targetComponentID(i.form,e),l=()=>this.putRef([i,i.form],"change",r),c,d=this.extractMeta(i.form);i.getAttribute(this.binding("change"))?c=Cg(i.form,me({_target:r._target},d),[i.name]):c=Cg(i.form,me({_target:r._target},d)),G.isUploadInput(i)&&i.files&&i.files.length>0&&Ln.trackFiles(i,Array.from(i.files)),s=Ln.serializeUploads(i);let h={type:"form",event:n,value:c,uploads:s,cid:a};this.pushWithReply(l,"event",h,u=>{if(G.showError(i,this.liveSocket.binding(Eg)),G.isUploadInput(i)&&i.getAttribute("data-phx-auto-upload")!==null){if(Ln.filesAwaitingPreflight(i).length>0){let[m,p]=l();this.uploadFiles(i.form,e,m,a,f=>{o&&o(u),this.triggerAwaitingSubmit(i.form)})}}else o&&o(u)})}triggerAwaitingSubmit(i){let e=this.getScheduledSubmit(i);if(e){let[t,n,r,o]=e;this.cancelSubmit(i),o()}}getScheduledSubmit(i){return this.formSubmits.find(([e,t,n,r])=>e.isSameNode(i))}scheduleSubmit(i,e,t,n){if(this.getScheduledSubmit(i))return!0;this.formSubmits.push([i,e,t,n])}cancelSubmit(i){this.formSubmits=this.formSubmits.filter(([e,t,n])=>e.isSameNode(i)?(this.undoRefs(t),!1):!0)}disableForm(i,e={}){let t=d=>!(O1(d,`${this.binding(Ig)}=ignore`,d.form)||O1(d,"data-phx-update=ignore",d.form)),n=d=>d.hasAttribute(this.binding(U9)),r=d=>d.tagName=="BUTTON",o=d=>["INPUT","TEXTAREA","SELECT"].includes(d.tagName),s=Array.from(i.elements),a=s.filter(n),l=s.filter(r).filter(t),c=s.filter(o).filter(t);return l.forEach(d=>{d.setAttribute(pg,d.disabled),d.disabled=!0}),c.forEach(d=>{d.setAttribute(L9,d.readOnly),d.readOnly=!0,d.files&&(d.setAttribute(pg,d.disabled),d.disabled=!0)}),i.setAttribute(this.binding(uA),""),this.putRef([i].concat(a).concat(l).concat(c),"submit",e)}pushFormSubmit(i,e,t,n,r,o){let s=()=>this.disableForm(i,r),a=this.targetComponentID(i,e);if(Ln.hasUploadsInProgress(i)){let[l,c]=s(),d=()=>this.pushFormSubmit(i,n,e,t,r,o);return this.scheduleSubmit(i,l,r,d)}else if(Ln.inputsAwaitingPreflight(i).length>0){let[l,c]=s(),d=()=>[l,c,r];this.uploadFiles(i,e,l,a,h=>{let u=this.extractMeta(i),m=Cg(i,me({submitter:n},u));this.pushWithReply(d,"event",{type:"form",event:t,value:m,cid:a},o)})}else if(!(i.hasAttribute(Jr)&&i.classList.contains("phx-submit-loading"))){let l=this.extractMeta(i),c=Cg(i,me({submitter:n},l));this.pushWithReply(s,"event",{type:"form",event:t,value:c,cid:a},o)}}uploadFiles(i,e,t,n,r){let o=this.joinCount,s=Ln.activeFileInputs(i),a=s.length;s.forEach(l=>{let c=new Ln(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=c;let d=c.entries().map(u=>u.toPreflightPayload()),h={ref:l.getAttribute(gc),entries:d,cid:this.targetComponentID(l.form,e)};this.log("upload",()=>["sending preflight request",h]),this.pushWithReply(null,"allow_upload",h,u=>{if(this.log("upload",()=>["got preflight response",u]),u.error){this.undoRefs(t);let[m,p]=u.error;this.log("upload",()=>[`error for entry ${m}`,p])}else{let m=p=>{this.channel.onError(()=>{this.joinCount===o&&p()})};c.initAdapterUpload(u,m,this.liveSocket)}})})}dispatchUploads(i,e){let t=G.findUploadInputs(this.el).filter(n=>n.name===i);t.length===0?Nn(`no live file inputs found matching the name "${i}"`):t.length>1?Nn(`duplicate live file inputs found matching the name "${i}"`):G.dispatchEvent(t[0],OA,{detail:{files:e}})}pushFormRecovery(i,e,t){this.liveSocket.withinOwners(i,(n,r)=>{let o=this.binding("change"),s=Array.from(i.elements).filter(c=>G.isFormInput(c)&&c.name&&!c.hasAttribute(o));if(s.length===0)return;let a=s.find(c=>c.type!=="hidden")||a[0],l=i.getAttribute(this.binding(gA))||i.getAttribute(this.binding("change"));vo.exec("change",l,n,a,["push",{_target:a.name,newCid:e,callback:t}])})}pushLinkPatch(i,e,t){let n=this.liveSocket.setPendingLink(i),r=e?()=>this.putRef([e],"click"):null,o=()=>this.liveSocket.redirect(window.location.href),s=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i,a=this.pushWithReply(r,"live_patch",{url:s},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(i,null,t,n):(this.liveSocket.commitPendingLink(n)&&(this.href=i),this.applyPendingUpdates(),t&&t(n))})});a?a.receive("timeout",o):o()}formsForRecovery(i){if(this.joinCount===0)return[];let e=this.binding("change"),t=document.createElement("template");return t.innerHTML=i,G.all(this.el,`form[${e}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(gA))!=="ignore").map(n=>{let r=t.content.querySelector(`form[id="${n.id}"][${e}="${n.getAttribute(e)}"]`);return r?[n,r,this.targetComponentID(r)]:[n,n,this.targetComponentID(n)]}).filter(([n,r,o])=>r)}maybePushComponentsDestroyed(i){let e=i.filter(t=>G.findComponentNodeList(this.el,t).length===0);e.length>0&&(this.pruningCIDs.push(...e),this.pushWithReply(null,"cids_will_destroy",{cids:e},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>e.indexOf(n)!==-1);let t=e.filter(n=>G.findComponentNodeList(this.el,n).length===0);t.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:t},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(i){let e=i.closest(ph);return i.getAttribute(uh)===this.id||e&&e.id===this.id||!e&&this.isDead}submitForm(i,e,t,n,r={}){G.putPrivate(i,Tg,!0);let o=this.liveSocket.binding(Eg),s=Array.from(i.elements);s.forEach(a=>G.putPrivate(a,Tg,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(i,e,t,n,r,()=>{s.forEach(a=>G.showError(a,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(i){return this.liveSocket.binding(i)}},WA=class{constructor(i,e,t={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" let liveSocket = new LiveSocket("/live", Socket, {...}) - `);this.socket=new e(i,t),this.bindingPrefix=t.bindingPrefix||Mj,this.opts=t,this.params=O9(t.params||{}),this.viewLogger=t.viewLogger,this.metadataCallbacks=t.metadata||{},this.defaults=Object.assign(xg(Pj),t.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=xg(window.location),this.hooks=t.hooks||{},this.uploaders=t.uploaders||{},this.loaderTimeout=t.loaderTimeout||Dj,this.reloadWithJitterTimer=null,this.maxReloads=t.maxReloads||bj,this.reloadJitterMin=t.reloadJitterMin||yj,this.reloadJitterMax=t.reloadJitterMax||Sj,this.failsafeJitter=t.failsafeJitter||Cj,this.localStorage=t.localStorage||window.localStorage,this.sessionStorage=t.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:O9(),onBeforeElUpdated:O9()},t.dom||{}),this.transitions=new dV,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(D9)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(gg)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(gg)==="false"}enableDebug(){this.sessionStorage.setItem(gg,"true")}enableProfiling(){this.sessionStorage.setItem(D9,"true")}disableDebug(){this.sessionStorage.setItem(gg,"false")}disableProfiling(){this.sessionStorage.removeItem(D9)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(R9,i)}disableLatencySim(){this.sessionStorage.removeItem(R9)}getLatencySim(){let i=this.sessionStorage.getItem(R9);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>vo.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{vo.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();zj(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=rs.updateLocal(this.localStorage,window.location.pathname,RA,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?Gj[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return $.all(document,`${ph}:not([${uh}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(j9)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),rs.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=$.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{$.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(t),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||$.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(cl)!==null}newRootView(i,e,t){let n=new UA(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=ll(i.closest(ph),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(P1);return ll(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(P1));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(Lj)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);vo.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=ll(O1(e.target,this.binding(dA)),o=>o.getAttribute(this.binding(dA))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(Ln.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(OA,e=>{let t=e.target;if(!$.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);Ln.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):$.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=O1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&$.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(Jr)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{vo.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");$.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);vo.isVisible(n)&&vo.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!rs.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{rs.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=O1(e.target,I9),n=t&&t.getAttribute(I9);if(!n||!this.isConnected()||!this.main||$.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(xj);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${I9} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){$.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){$.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>$.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return rs.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(rs.pushState(e,{type:"patch",id:this.main.id},i),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return rs.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,()=>{rs.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),this.registerNewLocation(window.location),r()})})}replaceRootHistory(){rs.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=xg(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{$.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){$.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{vo.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:h,type:u}=$.private(o,"prev-iteration")||{};h===d-1&&t!==u||($.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,m=>{$.putPrivate(o,z9,!0),$.isTextualInput(o)||this.setActiveElement(o),vo.exec("change",l,m,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;$.resetForm(n,this.binding(Eg));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(kj),o=this.binding(Aj),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);$.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},dV=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var jA="livebook:";function _c(i){try{let e=localStorage.getItem(jA+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function fh(i,e){try{let t=JSON.stringify(e);localStorage.setItem(jA+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var VA="app_auth_token:";function KA(i,e){fh(VA+i,e)}function qA(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=_c(VA+e);if(t)return t}return null}var hV={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{KA(i,e),this.pushEvent("app_auth_persisted")})}},GA=hV;function Ve(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function Jt(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function ea(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function Zr(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}var iL=Ui(QA()),nL=Ui(ZA()),K9=Ui(tL());function rL(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function vc(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function q9(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function gh(i){return i.offsetParent===null}function G9(i){return!gh(i)&&q9(i)}function oL(i,e,t){return Math.min(Math.max(i,e),t)}function sL(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let n=i.cloneNode();n.innerHTML="
",i.appendChild(n);let r=n.clientHeight;n.innerHTML="
";let o=n.clientHeight;return i.removeChild(n),o-r}else return t}function aL(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function dl(i){let{height:e}=i.getBoundingClientRect();e":">",'"':""","'":"'"};function pL(i){return(i||"").replace(/[&<>"']/g,e=>uV[e])}function Pg(i){let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;r {i?this.updatePreview({data:this.decodeAudio(vh(i.data)),numChannels:i.num_channels,samplingRate:i.sampling_rate}):this.clearPreview()}),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...$9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...$9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...$9)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps()},getProps(){return{id:Ve(this.el,"data-id"),phxTarget:Ve(this.el,"data-phx-target",Zr),samplingRate:Ve(this.el,"data-sampling-rate",Zr),endianness:Ve(this.el,"data-endianness"),format:Ve(this.el,"data-format")}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=pV(t);this.pushAudio(n)})},updatePreview(i){let e=this.audioEl.src,t=fV(i);this.audioEl.src=URL.createObjectURL(t),e&&URL.revokeObjectURL(e)},clearPreview(){let i=this.audioEl.src;this.audioEl.src="",i&&URL.revokeObjectURL(i)},pushAudio(i){this.pushEventTo(this.props.phxTarget,"change",{data:Pg(this.encodeAudio(i)),num_channels:i.numChannels,sampling_rate:i.samplingRate})},encodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i.data);if(this.props.format==="wav")return fL(i.data,i.numChannels,i.samplingRate)},decodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i);if(this.props.format==="wav")return gV(i)},fixEndianness32(i){if(_V()===this.props.endianness)return i;for(let e=0;e =0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Hg,bV="http://www.w3.org/1999/xhtml",sr=typeof document=="undefined"?void 0:document,yV=!!sr&&"content"in sr.createElement("template"),SV=!!sr&&sr.createRange&&"createContextualFragment"in sr.createRange();function CV(i){var e=sr.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function wV(i){Hg||(Hg=sr.createRange(),Hg.selectNode(sr.body));var e=Hg.createContextualFragment(i);return e.childNodes[0]}function xV(i){var e=sr.createElement("body");return e.innerHTML=i,e.childNodes[0]}function EV(i){return i=i.trim(),yV?CV(i):SV?wV(i):xV(i)}function Bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function TV(i,e){return!e||e===bV?sr.createElement(i):sr.createElementNS(e,i)}function IV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function Y9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var vL={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}Y9(i,e,"selected")},INPUT:function(i,e){Y9(i,e,"checked"),Y9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},H1=1,bL=11,yL=3,SL=8;function hl(){}function kV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function AV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=sr.createElement("html"),n.innerHTML=o}else n=EV(n);else n.nodeType===bL&&(n=n.firstElementChild);var s=r.getNodeKey||kV,a=r.onBeforeNodeAdded||hl,l=r.onNodeAdded||hl,c=r.onBeforeElUpdated||hl,d=r.onElUpdated||hl,h=r.onBeforeNodeDiscarded||hl,u=r.onNodeDiscarded||hl,m=r.onBeforeElChildrenUpdated||hl,p=r.skipFromChildren||hl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===H1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===H1||Z.nodeType===bL)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function R(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&Bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):R(ee)}else R(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):vL.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,yi,ei,Mt;e:for(;H;){for(ei=H.nextSibling,X=s(H);!V&&U;){if(yi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=ei,U=yi;continue e}Tt=s(U);var ki=U.nodeType,Ot=void 0;if(ki===H.nodeType&&(ki===H1?(X?X!==Tt&&((Mt=b[X])?yi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&Bg(U,H),Ot&&q(U,H)):(ki===yL||ki==SL)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=ei,U=yi;continue e}Tt?T(Tt):A(U,Z,!0),U=yi}if(X&&(Mt=b[X])&&Bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var zn=a(H);zn!==!1&&(zn&&(H=zn),H.actualize&&(H=H.actualize(Z.ownerDocument||sr)),f(Z,H),R(H))}H=ei,U=yi}j(Z,U,Tt);var Cr=vL[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===H1)Oe===H1?Bg(t,n)||(u(t),J=IV(t,TV(n.nodeName,n.namespaceURI))):J=n;else if(ke===yL||ke===SL){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe s.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}var FL=Ui(Q9(),1);var jn=class extends Error{constructor(e,t,n){let r=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(n=t,t=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?r[1]=n:(r[0]=n.slice(0,s),r[1]=n.slice(s+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=YE(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack=typeof e=="object"?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=r[0],this.ruleId=r[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};jn.prototype.file="";jn.prototype.name="";jn.prototype.reason="";jn.prototype.message="";jn.prototype.stack="";jn.prototype.fatal=null;jn.prototype.column=null;jn.prototype.line=null;jn.prototype.source=null;jn.prototype.ruleId=null;jn.prototype.position=null;var bo={basename:DV,dirname:RV,extname:MV,join:OV,sep:"/"};function DV(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');z1(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.charCodeAt(r)===e.charCodeAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function RV(i){if(z1(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.charCodeAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.charCodeAt(0)===47?"/":".":e===1&&i.charCodeAt(0)===47?"//":i.slice(0,e)}function MV(i){z1(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.charCodeAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function OV(...i){let e=-1,t;for(;++e 0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function FV(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s 2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function z1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var ML={cwd:HV};function HV(){return"/"}function bh(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function OL(i){if(typeof i=="string")i=new URL(i);else if(!bh(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return BV(i)}function BV(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t {if(O||!R||!j)A(O);else{let q=o.stringify(R,j);q==null||(WV(q)?j.value=q:j.result=q),A(O,j)}});function A(O,R){O||!R?T(O):C?C(R):_(null,R)}}}function p(f){let _;o.freeze(),ty("processSync",o.Parser),iy("processSync",o.Compiler);let b=W1(f);return o.process(b,C),zL("processSync","process",_),b;function C(T){_=!0,X9(T)}}}function HL(i,e){return typeof i=="function"&&i.prototype&&(zV(i.prototype)||e in i.prototype)}function zV(i){let e;for(e in i)if(WL.call(i,e))return!0;return!1}function ty(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function iy(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function ny(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function BL(i){if(!B1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function zL(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function W1(i){return UV(i)?i:new U1(i)}function UV(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function WV(i){return typeof i=="string"||(0,UL.default)(i)}function Wg(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return tT(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var jV={tokenize:GV,partial:!0},KL={tokenize:$V,partial:!0},qL={tokenize:YV,partial:!0},yh={tokenize:QV,partial:!0},GL={tokenize:XV,partial:!0},$L={tokenize:KV,previous:QL},YL={tokenize:qV,previous:ay},ia={tokenize:VV,previous:JL},os={},oy={text:os},bc=48;for(;bc<123;)os[bc]=ia,bc++,bc===58?bc=65:bc===91&&(bc=97);os[43]=ia;os[45]=ia;os[46]=ia;os[95]=ia;os[72]=[ia,YL];os[104]=[ia,YL];os[87]=[ia,$L];os[119]=[ia,$L];function VV(i,e,t){let n=this,r,o;return s;function s(m){return!VL(m)||!JL(n.previous)||ly(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(m))}function a(m){return VL(m)?(i.consume(m),a):m===64?(i.consume(m),l):t(m)}function l(m){return m===46?i.check(yh,u,c)(m):m===45||m===95?i.check(yh,t,d)(m):Fd(m)?(!o&&QE(m)&&(o=!0),i.consume(m),l):u(m)}function c(m){return i.consume(m),r=!0,o=void 0,l}function d(m){return i.consume(m),h}function h(m){return m===46?i.check(yh,t,c)(m):l(m)}function u(m){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(m)):t(m)}}function KV(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!QL(n.previous)||ly(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(jV,i.attempt(KL,i.attempt(qL,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function qV(i,e,t){let n=this;return r;function r(p){return p!==72&&p!==104||!ay(n.previous)||ly(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(p),o)}function o(p){return p===84||p===116?(i.consume(p),s):t(p)}function s(p){return p===84||p===116?(i.consume(p),a):t(p)}function a(p){return p===80||p===112?(i.consume(p),l):t(p)}function l(p){return p===83||p===115?(i.consume(p),c):c(p)}function c(p){return p===58?(i.consume(p),d):t(p)}function d(p){return p===47?(i.consume(p),h):t(p)}function h(p){return p===47?(i.consume(p),u):t(p)}function u(p){return p===null||T2(p)||qu(p)||Gu(p)?t(p):i.attempt(KL,i.attempt(qL,m),t)(p)}function m(p){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(p)}}function GV(i,e,t){return n;function n(l){return i.consume(l),r}function r(l){return l===87||l===119?(i.consume(l),o):t(l)}function o(l){return l===87||l===119?(i.consume(l),s):t(l)}function s(l){return l===46?(i.consume(l),a):t(l)}function a(l){return l===null||Si(l)?t(l):e(l)}}function $V(i,e,t){let n,r;return o;function o(l){return l===38?i.check(GL,a,s)(l):l===46||l===95?i.check(yh,a,s)(l):l===null||T2(l)||qu(l)||l!==45&&Gu(l)?a(l):(i.consume(l),o)}function s(l){return l===46?(r=n,n=void 0,i.consume(l),o):(l===95&&(n=!0),i.consume(l),o)}function a(l){return!r&&!n?e(l):t(l)}}function YV(i,e){let t=0;return n;function n(s){return s===38?i.check(GL,e,r)(s):(s===40&&t++,s===41?i.check(yh,o,r)(s):sy(s)?e(s):XL(s)?i.check(yh,e,r)(s):(i.consume(s),n))}function r(s){return i.consume(s),n}function o(s){return t--,t<0?e(s):r(s)}}function XV(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return E2(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return sy(s)?e(s):t(s)}}function QV(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return XL(o)?(i.consume(o),r):sy(o)?e(o):t(o)}}function XL(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===95||i===126}function sy(i){return i===null||i===60||Ur(i)}function VL(i){return i===43||i===45||i===46||i===95||Fd(i)}function QL(i){return i===null||i===40||i===42||i===95||i===126||Ur(i)}function ay(i){return i===null||!E2(i)}function JL(i){return i!==47&&ay(i)}function ly(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var JV={'"':"quot","&":"amp","<":"lt",">":"gt"};function ZL(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+JV[t]+";"}}function jg(i,e){let t=ZL(ZV(i||""));if(!e)return t;let n=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),s=t.indexOf("/");return n<0||s>-1&&n>s||r>-1&&n>r||o>-1&&n>o||e.test(t.slice(0,n))?t:""}function ZV(i){let e=[],t=-1,n=0,r=0;for(;++t 55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}var eK={tokenize:aK,partial:!0};function cy(){return{document:{91:{tokenize:rK,continuation:{tokenize:oK},exit:sK}},text:{91:{tokenize:nK},93:{add:"after",tokenize:tK,resolveTo:iK}}}}function tK(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Ql(n.sliceSerialize({start:s.end,end:n.now()}));return c.charCodeAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function iK(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function nK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){let m;return u===null||u===91||o++>999?t(u):u===93?s?(i.exit("chunkString"),m=i.exit("gfmFootnoteCallString"),r.includes(Ql(n.sliceSerialize(m)))?h(u):t(u)):t(u):(i.consume(u),Ur(u)||(s=!0),u===92?d:c)}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}function h(u){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function rK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(f){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(f){return f===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(f)}function d(f){let _;return f===null||f===91||s>999?t(f):f===93?a?(_=i.exit("gfmFootnoteDefinitionLabelString"),o=Ql(n.sliceSerialize(_)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),m):t(f):Si(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",h(f))}function h(f){return f===null||Si(f)||f===91||f===93||s>999?(i.exit("chunkString"),d(f)):(Ur(f)||(a=!0),s++,i.consume(f),f===92?u:h)}function u(f){return f===91||f===92||f===93?(i.consume(f),s++,h):h(f)}function m(f){return f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),Qn(i,p,"gfmFootnoteDefinitionWhitespace")):t(f)}function p(f){return r.includes(o)||r.push(o),e(f)}}function oK(i,e,t){return i.check(ZE,e,i.attempt(eK,e,t))}function sK(i){i.exit("gfmFootnoteDefinition")}function aK(i,e,t){let n=this;return Qn(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function dy(i={}){let e=i.singleTilde,t={tokenize:r,resolveAll:n};return e==null&&(e=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function n(o,s){let a=-1;for(;++a 1?a(m):(o.consume(m),d++,u);if(d<2&&!e)return a(m);let f=o.exit("strikethroughSequenceTemporary"),_=I2(m);return f._open=!_||_===2&&!!p,f._close=!p||p===2&&!!_,s(m)}}}var hy={flow:{null:{tokenize:cK,resolve:lK}}},eN={tokenize:dK,partial:!0};function lK(i,e){let t=-1,n,r,o,s,a,l,c;for(;++t =4?ee(U):(n._gfmTableDynamicInterruptHack=!0,B.check(n.parser.constructs.flow,function(Tt){return n._gfmTableDynamicInterruptHack=!1,ee(Tt)},function(Tt){return n._gfmTableDynamicInterruptHack=!1,Z(Tt)})(U))}}}function dK(i,e,t){let n=0;return r;function r(s){return i.enter("check"),i.consume(s),o}function o(s){return s===-1||s===32?(i.consume(s),n++,n===4?e:o):s===null||Ur(s)?e(s):t(s)}}var hK={tokenize:uK},uy={text:{91:hK}};function uK(i,e,t){let n=this;return r;function r(a){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(a):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),o)}function o(a){return Ur(a)?(i.enter("taskListCheckValueUnchecked"),i.consume(a),i.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(i.enter("taskListCheckValueChecked"),i.consume(a),i.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),i.check({tokenize:mK},e,t)):t(a)}}function mK(i,e,t){let n=this;return Qn(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||Si(o))&&o!==null?e(o):t(o)}}function tN(i){return XE([oy,cy(),dy(i),hy,uy])}function Sh(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}function my(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var mn=function(i){if(i==null)return _K;if(typeof i=="string")return gK(i);if(typeof i=="object")return Array.isArray(i)?pK(i):fK(i);if(typeof i=="function")return Vg(i);throw new Error("Expected function, string, or object as test")};function pK(i){let e=[],t=-1;for(;++t ":""))+")"})),u;function u(){var m=[],p,f,_;if((!e||r(a,l,c[c.length-1]||null))&&(m=vK(t(a,c)),m[0]===py))return m;if(a.children&&m[0]!==nN)for(f=(n?a.children.length:-1)+o,_=c.concat(a);f>-1&&f 0?{type:"text",value:w}:void 0),w!==!1&&(f!==C&&b.push({type:"text",value:h.value.slice(f,C)}),Array.isArray(w)?b.push(...w):w&&b.push(w),f=C+T[0].length),!m.global)break;T=m.exec(h.value)}return C===void 0?(b=[h],_--):(f i}var fy="phrasing",gy=["autolink","link","image","label"],aN={transforms:[TK],enter:{literalAutolink:SK,literalAutolinkEmail:_y,literalAutolinkHttp:_y,literalAutolinkWww:_y},exit:{literalAutolink:EK,literalAutolinkEmail:xK,literalAutolinkHttp:CK,literalAutolinkWww:wK}},lN={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:gy}]};function SK(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function _y(i){this.config.enter.autolinkProtocol.call(this,i)}function CK(i){this.config.exit.autolinkProtocol.call(this,i)}function wK(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function xK(i){this.config.exit.autolinkEmail.call(this,i)}function EK(i){this.exit(i)}function TK(i){sN(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,IK],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,kK]],{ignore:["link","linkReference"]})}function IK(i,e,t,n,r){let o="";if(!cN(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!AK(t)))return!1;let s=LK(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function kK(i,e,t,n){return!cN(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function AK(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function LK(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i),t,n,r,o;if(e)for(i=i.slice(0,e.index),o=e[0],t=o.indexOf(")"),n=Sh(i,"("),r=Sh(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function cN(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||qu(t)||Gu(t))&&(!e||t!==47)}function vy(i){return i.label||!i.identifier?i.label||"":eT(i.identifier)}function Dn(i){let e=i||{},t=e.now||{},n=e.lineShift||0,r=t.line||1,o=t.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:r,column:o},lineShift:n}}function a(c){n+=c}function l(c=""){let d=c.split(/\r?\n|\r/g),h=d[d.length-1];return r+=d.length-1,o=d.length===1?o+h.length:1+h.length+n,c}}function qg(i,e,t){let n=e.indexStack,r=i.children||[],o=Dn(t),s=[],a=-1;for(n.push(-1);++a {this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(D9)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(gg)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(gg)==="false"}enableDebug(){this.sessionStorage.setItem(gg,"true")}enableProfiling(){this.sessionStorage.setItem(D9,"true")}disableDebug(){this.sessionStorage.setItem(gg,"false")}disableProfiling(){this.sessionStorage.removeItem(D9)}enableLatencySim(i){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(R9,i)}disableLatencySim(){this.sessionStorage.removeItem(R9)}getLatencySim(){let i=this.sessionStorage.getItem(R9);return i?parseInt(i):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let i=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?i():document.addEventListener("DOMContentLoaded",()=>i())}disconnect(i){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(i)}replaceTransport(i){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(i),this.connect()}execJS(i,e,t=null){this.owner(i,n=>vo.exec(t,e,n,i))}execJSHookPush(i,e,t,n){this.withinOwners(i,r=>{vo.exec("hook",e,r,i,["push",{data:t,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(i,e){this.domCallbacks[i](...e)}time(i,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(i);let t=e();return console.timeEnd(i),t}log(i,e,t){if(this.viewLogger){let[n,r]=t();this.viewLogger(i,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=t();zj(i,e,n,r)}}requestDOMUpdate(i){this.transitions.after(i)}transition(i,e,t=function(){}){this.transitions.addTransition(i,e,t)}onChannel(i,e,t){i.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>t(n),r):t(n)})}wrapPush(i,e,t){let n=this.getLatencySim(),r=i.joinCount;if(!n)return this.isConnected()&&e.timeout?t().receive("timeout",()=>{i.joinCount===r&&!i.isDestroyed()&&this.reloadWithJitter(i,()=>{this.log(i,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):t();let o={receives:[],receive(s,a){this.receives.push([s,a])}};return setTimeout(()=>{i.isDestroyed()||o.receives.reduce((s,[a,l])=>s.receive(a,l),t())},n),o}reloadWithJitter(i,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let t=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-t+1))+t,o=rs.updateLocal(this.localStorage,window.location.pathname,RA,0,s=>s+1);o>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{i.isDestroyed()||i.isConnected()||(i.destroy(),e?e():this.log(i,"join",()=>[`encountered ${o} consecutive reloads`]),o>this.maxReloads&&this.log(i,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(i){return i&&i.startsWith("Phoenix.")?Gj[i.split(".")[1]]:this.hooks[i]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(i){return`${this.getBindingPrefix()}${i}`}channel(i,e){return this.socket.channel(i,e)}joinDeadView(){let i=document.body;if(i&&!this.isPhxView(i)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(i);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>e.execNewMounted())}}joinRootViews(){let i=!1;return G.all(document,`${ph}:not([${uh}])`,e=>{if(!this.getRootById(e.id)){let t=this.newRootView(e);t.setHref(this.getHref()),t.join(),e.hasAttribute(j9)&&(this.main=t)}i=!0}),i}redirect(i,e){this.unload(),rs.redirect(i,e)}replaceMain(i,e,t=null,n=this.setPendingLink(i)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=G.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(o,e,r),this.main.setRedirect(i),this.transitionRemoves(),this.main.join((s,a)=>{s===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{G.findPhxSticky(document).forEach(l=>o.appendChild(l)),this.outgoingMainEl.replaceWith(o),this.outgoingMainEl=null,t&&requestAnimationFrame(()=>t(n)),a()})})}transitionRemoves(i){let e=this.binding("remove");i=i||G.all(document,`[${e}]`),i.forEach(t=>{this.execJS(t,t.getAttribute(e),"remove")})}isPhxView(i){return i.getAttribute&&i.getAttribute(cl)!==null}newRootView(i,e,t){let n=new UA(i,this,null,e,t);return this.roots[n.id]=n,n}owner(i,e){let t=ll(i.closest(ph),n=>this.getViewByEl(n))||this.main;t&&e(t)}withinOwners(i,e){this.owner(i,t=>e(t,i))}getViewByEl(i){let e=i.getAttribute(P1);return ll(this.getRootById(e),t=>t.getDescendentByEl(i))}getRootById(i){return this.roots[i]}destroyAllViews(){for(let i in this.roots)this.roots[i].destroy(),delete this.roots[i];this.main=null}destroyViewByEl(i){let e=this.getRootById(i.getAttribute(P1));e&&e.id===i.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(i.id)}setActiveElement(i){if(this.activeElement===i)return;this.activeElement=i;let e=()=>{i===this.activeElement&&(this.activeElement=null),i.removeEventListener("mouseup",this),i.removeEventListener("touchend",this)};i.addEventListener("mouseup",e),i.addEventListener("touchend",e)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(i){this.prevActive&&i.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:i}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),i||this.bindNav(),this.bindClicks(),i||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,t,n,r,o,s)=>{let a=r.getAttribute(this.binding(Lj)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,t,n,r,o,s)=>{if(!s){let a=me({key:e.key},this.eventMeta(t,e,r));vo.exec(t,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,t,n,r,o,s,a)=>{if(a==="window"){let l=this.eventMeta(t,e,r);vo.exec(t,s,n,r,["push",{data:l}])}}),window.addEventListener("dragover",e=>e.preventDefault()),window.addEventListener("drop",e=>{e.preventDefault();let t=ll(O1(e.target,this.binding(dA)),o=>o.getAttribute(this.binding(dA))),n=t&&document.getElementById(t),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(Ln.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(OA,e=>{let t=e.target;if(!G.isUploadInput(t))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);Ln.trackFiles(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(i,e,t){let n=this.metadataCallbacks[i];return n?n(e,t):{}}setPendingLink(i){return this.linkRef++,this.pendingLink=i,this.linkRef}commitPendingLink(i){return this.linkRef!==i?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(i,e){for(let t in i){let n=i[t];this.on(n,r=>{let o=this.binding(t),s=this.binding(`window-${t}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,t,l,r.target,a,null)})}):G.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,d=>{e(r,t,d,l,c,"window")})})})})}}bindClicks(){window.addEventListener("click",i=>this.clickStartedAtTarget=i.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(i,e,t){let n=this.binding(e);window.addEventListener(i,r=>{let o=null;if(t)o=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;o=O1(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let s=o&&o.getAttribute(n);if(!s){!t&&G.isNewPageClick(r,window.location)&&this.unload();return}o.getAttribute("href")==="#"&&r.preventDefault(),!o.hasAttribute(Jr)&&this.debounce(o,r,"click",()=>{this.withinOwners(o,a=>{vo.exec("click",s,a,o,["push",{data:this.eventMeta("click",r,o)}])})})},t)}dispatchClickAway(i,e){let t=this.binding("click-away");G.all(document,`[${t}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(i.target,r=>{let o=n.getAttribute(t);vo.isVisible(n)&&vo.exec("click",o,r,n,["push",{data:this.eventMeta("click",i,i.target)}])})})}bindNav(){if(!rs.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let i=null;window.addEventListener("scroll",e=>{clearTimeout(i),i=setTimeout(()=>{rs.updateCurrentState(t=>Object.assign(t,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:t,id:n,root:r,scroll:o}=e.state||{},s=window.location.href;G.dispatchEvent(window,"phx:navigate",{detail:{href:s,patch:t==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&t==="patch"&&n===this.main.id?this.main.pushLinkPatch(s,null,()=>{this.maybeScroll(o)}):this.replaceMain(s,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(o)})})},!1),window.addEventListener("click",e=>{let t=O1(e.target,I9),n=t&&t.getAttribute(I9);if(!n||!this.isConnected()||!this.main||G.wantsNewTab(e))return;let r=t.href,o=t.getAttribute(xj);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,o,t);else if(n==="redirect")this.historyRedirect(r,o);else throw new Error(`expected ${I9} to be "patch" or "redirect", got: ${n}`);let s=t.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(t,s,"click"))})},!1)}maybeScroll(i){typeof i=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,i)})}dispatchEvent(i,e={}){G.dispatchEvent(window,`phx:${i}`,{detail:e})}dispatchEvents(i){i.forEach(([e,t])=>this.dispatchEvent(e,t))}withPageLoading(i,e){G.dispatchEvent(window,"phx:page-loading-start",{detail:i});let t=()=>G.dispatchEvent(window,"phx:page-loading-stop",{detail:i});return e?e(t):t}pushHistoryPatch(i,e,t){if(!this.isConnected())return rs.redirect(i);this.withPageLoading({to:i,kind:"patch"},n=>{this.main.pushLinkPatch(i,t,r=>{this.historyPatch(i,e,r),n()})})}historyPatch(i,e,t=this.setPendingLink(i)){this.commitPendingLink(t)&&(rs.pushState(e,{type:"patch",id:this.main.id},i),G.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:i,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(i,e,t){if(!this.isConnected())return rs.redirect(i,t);if(/^\/$|^\/[^\/]+.*$/.test(i)){let{protocol:r,host:o}=window.location;i=`${r}//${o}${i}`}let n=window.scrollY;this.withPageLoading({to:i,kind:"redirect"},r=>{this.replaceMain(i,t,o=>{o===this.linkRef&&(rs.pushState(e,{type:"redirect",id:this.main.id,scroll:n},i),G.dispatchEvent(window,"phx:navigate",{detail:{href:i,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),r()})})}replaceRootHistory(){rs.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(i){let{pathname:e,search:t}=this.currentLocation;return e+t===i.pathname+i.search?!1:(this.currentLocation=xg(i),!0)}bindForms(){let i=0,e=!1;this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit")),r=t.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,t.preventDefault(),this.withinOwners(t.target,o=>{o.disableForm(t.target),window.requestAnimationFrame(()=>{G.isUnloadableFormSubmit(t)&&this.unload(),t.target.submit()})}))},!0),this.on("submit",t=>{let n=t.target.getAttribute(this.binding("submit"));if(!n){G.isUnloadableFormSubmit(t)&&this.unload();return}t.preventDefault(),t.target.disabled=!0,this.withinOwners(t.target,r=>{vo.exec("submit",n,r,t.target,["push",{submitter:t.submitter}])})},!1);for(let t of["change","input"])this.on(t,n=>{let r=this.binding("change"),o=n.target,s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,d=i;i++;let{at:h,type:u}=G.private(o,"prev-iteration")||{};h===d-1&&t!==u||(G.putPrivate(o,"prev-iteration",{at:d,type:t}),this.debounce(o,n,t,()=>{this.withinOwners(c,m=>{G.putPrivate(o,z9,!0),G.isTextualInput(o)||this.setActiveElement(o),vo.exec("change",l,m,o,["push",{_target:n.target.name,dispatcher:c}])})}))},!1);this.on("reset",t=>{let n=t.target;G.resetForm(n,this.binding(Eg));let r=Array.from(n.elements).find(o=>o.type==="reset");window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(i,e,t,n){if(t==="blur"||t==="focusout")return n();let r=this.binding(kj),o=this.binding(Aj),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(i,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(i);G.debounce(i,e,r,s,o,a,c,()=>{n()})})}silenceEvents(i){this.silenced=!0,i(),this.silenced=!1}on(i,e){window.addEventListener(i,t=>{this.silenced||e(t)})}},dV=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(i=>{clearTimeout(i),this.transitions.delete(i)}),this.flushPendingOps()}after(i){this.size()===0?i():this.pushPendingOp(i)}addTransition(i,e,t){e();let n=setTimeout(()=>{this.transitions.delete(n),t(),this.flushPendingOps()},i);this.transitions.add(n)}pushPendingOp(i){this.pendingOps.push(i)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let i=this.pendingOps.shift();i&&(i(),this.flushPendingOps())}};var jA="livebook:";function _c(i){try{let e=localStorage.getItem(jA+i);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function fh(i,e){try{let t=JSON.stringify(e);localStorage.setItem(jA+i,t)}catch(t){console.error(`Failed to write to local storage, reason: ${t.message}`)}}var VA="app_auth_token:";function KA(i,e){fh(VA+i,e)}function qA(){let i=window.location.pathname;if(i.startsWith("/apps/")){let e=i.split("/")[2],t=_c(VA+e);if(t)return t}return null}var hV={mounted(){this.handleEvent("persist_app_auth",({slug:i,token:e})=>{KA(i,e),this.pushEvent("app_auth_persisted")})}},GA=hV;function Ve(i,e,t=null){if(!i.hasAttribute(e))throw new Error(`Missing attribute '${e}' on element <${i.tagName}:${i.id}>`);let n=i.getAttribute(e);return t?t(n):n}function Jt(i,e,t,n=null){if(i.hasAttribute(e)){let r=i.getAttribute(e);return n?n(r):r}else return t}function ea(i){if(i==="true")return!0;if(i==="false")return!1;throw new Error(`Invalid boolean attribute ${i}, should be either "true" or "false"`)}function Zr(i){let e=parseInt(i,10);if(Number.isNaN(e))throw new Error(`Invalid integer value ${i}`);return e}var iL=Ui(QA()),nL=Ui(ZA()),K9=Ui(tL());function rL(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}function vc(i){return i.matches&&i.matches("input, textarea, [contenteditable]")}function q9(i){let e=i.getBoundingClientRect();return e.bottom>=0&&e.top<=window.innerHeight}function gh(i){return i.offsetParent===null}function G9(i){return!gh(i)&&q9(i)}function oL(i,e,t){return Math.min(Math.max(i,e),t)}function sL(i){let e=window.getComputedStyle(i),t=parseInt(e.lineHeight,10);if(Number.isNaN(t)){let n=i.cloneNode();n.innerHTML="
",i.appendChild(n);let r=n.clientHeight;n.innerHTML="
";let o=n.clientHeight;return i.removeChild(n),o-r}else return t}function aL(i){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)}function dl(i){let{height:e}=i.getBoundingClientRect();e":">",'"':""","'":"'"};function pL(i){return(i||"").replace(/[&<>"']/g,e=>uV[e])}function Pg(i){let e="",t=new Uint8Array(i),n=t.byteLength;for(let r=0;r {i?this.updatePreview({data:this.decodeAudio(vh(i.data)),numChannels:i.num_channels,samplingRate:i.sampling_rate}):this.clearPreview()}),this.uploadButton.addEventListener("click",i=>{this.inputEl.click()}),this.inputEl.addEventListener("change",i=>{let[e]=i.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",i=>{i.stopPropagation(),i.preventDefault(),i.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",i=>{i.stopPropagation(),i.preventDefault();let[e]=i.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",i=>{this.el.classList.add(...$9)}),this.el.addEventListener("dragleave",i=>{this.el.contains(i.relatedTarget)||this.el.classList.remove(...$9)}),this.el.addEventListener("drop",i=>{this.el.classList.remove(...$9)}),this.recordButton.addEventListener("click",i=>{this.startRecording()}),this.stopButton.addEventListener("click",i=>{this.stopRecording()}),this.cancelButton.addEventListener("click",i=>{this.stopRecording(!1)})},updated(){this.props=this.getProps()},getProps(){return{id:Ve(this.el,"data-id"),phxTarget:Ve(this.el,"data-phx-target",Zr),samplingRate:Ve(this.el,"data-sampling-rate",Zr),endianness:Ve(this.el,"data-endianness"),format:Ve(this.el,"data-format")}},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{this.mediaRecorder=new MediaRecorder(i),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(i=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),i&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(i){let e=new FileReader;e.onload=t=>{this.loadEncodedAudio(t.target.result)},e.readAsArrayBuffer(i)},loadEncodedAudio(i){new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(i,t=>{let n=pV(t);this.pushAudio(n)})},updatePreview(i){let e=this.audioEl.src,t=fV(i);this.audioEl.src=URL.createObjectURL(t),e&&URL.revokeObjectURL(e)},clearPreview(){let i=this.audioEl.src;this.audioEl.src="",i&&URL.revokeObjectURL(i)},pushAudio(i){this.pushEventTo(this.props.phxTarget,"change",{data:Pg(this.encodeAudio(i)),num_channels:i.numChannels,sampling_rate:i.samplingRate})},encodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i.data);if(this.props.format==="wav")return fL(i.data,i.numChannels,i.samplingRate)},decodeAudio(i){if(this.props.format==="pcm_f32")return this.fixEndianness32(i);if(this.props.format==="wav")return gV(i)},fixEndianness32(i){if(_V()===this.props.endianness)return i;for(let e=0;e =0;l--)n=t[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=i.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(o,r,s))):(a=i.getAttribute(r),a!==s&&i.setAttribute(r,s));for(var c=i.attributes,d=c.length-1;d>=0;d--)n=c[d],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||i.removeAttributeNS(o,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var Hg,bV="http://www.w3.org/1999/xhtml",sr=typeof document=="undefined"?void 0:document,yV=!!sr&&"content"in sr.createElement("template"),SV=!!sr&&sr.createRange&&"createContextualFragment"in sr.createRange();function CV(i){var e=sr.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function wV(i){Hg||(Hg=sr.createRange(),Hg.selectNode(sr.body));var e=Hg.createContextualFragment(i);return e.childNodes[0]}function xV(i){var e=sr.createElement("body");return e.innerHTML=i,e.childNodes[0]}function EV(i){return i=i.trim(),yV?CV(i):SV?wV(i):xV(i)}function Bg(i,e){var t=i.nodeName,n=e.nodeName,r,o;return t===n?!0:(r=t.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?t===n.toUpperCase():o<=90&&r>=97?n===t.toUpperCase():!1)}function TV(i,e){return!e||e===bV?sr.createElement(i):sr.createElementNS(e,i)}function IV(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function Y9(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var vL={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}Y9(i,e,"selected")},INPUT:function(i,e){Y9(i,e,"checked"),Y9(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}i.selectedIndex=t}}},H1=1,bL=11,yL=3,SL=8;function hl(){}function kV(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function AV(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var o=n;n=sr.createElement("html"),n.innerHTML=o}else n=EV(n);else n.nodeType===bL&&(n=n.firstElementChild);var s=r.getNodeKey||kV,a=r.onBeforeNodeAdded||hl,l=r.onNodeAdded||hl,c=r.onBeforeElUpdated||hl,d=r.onElUpdated||hl,h=r.onBeforeNodeDiscarded||hl,u=r.onNodeDiscarded||hl,m=r.onBeforeElChildrenUpdated||hl,p=r.skipFromChildren||hl,f=r.addChild||function(Z,ee){return Z.appendChild(ee)},_=r.childrenOnly===!0,b=Object.create(null),C=[];function T(Z){C.push(Z)}function w(Z,ee){if(Z.nodeType===H1)for(var V=Z.firstChild;V;){var H=void 0;ee&&(H=s(V))?T(H):(u(V),V.firstChild&&w(V,ee)),V=V.nextSibling}}function A(Z,ee,V){h(Z)!==!1&&(ee&&ee.removeChild(Z),u(Z),w(Z,V))}function O(Z){if(Z.nodeType===H1||Z.nodeType===bL)for(var ee=Z.firstChild;ee;){var V=s(ee);V&&(b[V]=ee),O(ee),ee=ee.nextSibling}}O(t);function R(Z){l(Z);for(var ee=Z.firstChild;ee;){var V=ee.nextSibling,H=s(ee);if(H){var U=b[H];U&&Bg(ee,U)?(ee.parentNode.replaceChild(U,ee),q(U,ee)):R(ee)}else R(ee);ee=V}}function j(Z,ee,V){for(;ee;){var H=ee.nextSibling;(V=s(ee))?T(V):A(ee,Z,!0),ee=H}}function q(Z,ee,V){var H=s(ee);H&&delete b[H],!(!V&&(c(Z,ee)===!1||(i(Z,ee),d(Z),m(Z,ee)===!1)))&&(Z.nodeName!=="TEXTAREA"?_e(Z,ee):vL.TEXTAREA(Z,ee))}function _e(Z,ee){var V=p(Z),H=ee.firstChild,U=Z.firstChild,X,Tt,yi,ei,Mt;e:for(;H;){for(ei=H.nextSibling,X=s(H);!V&&U;){if(yi=U.nextSibling,H.isSameNode&&H.isSameNode(U)){H=ei,U=yi;continue e}Tt=s(U);var ki=U.nodeType,Ot=void 0;if(ki===H.nodeType&&(ki===H1?(X?X!==Tt&&((Mt=b[X])?yi===Mt?Ot=!1:(Z.insertBefore(Mt,U),Tt?T(Tt):A(U,Z,!0),U=Mt):Ot=!1):Tt&&(Ot=!1),Ot=Ot!==!1&&Bg(U,H),Ot&&q(U,H)):(ki===yL||ki==SL)&&(Ot=!0,U.nodeValue!==H.nodeValue&&(U.nodeValue=H.nodeValue))),Ot){H=ei,U=yi;continue e}Tt?T(Tt):A(U,Z,!0),U=yi}if(X&&(Mt=b[X])&&Bg(Mt,H))V||f(Z,Mt),q(Mt,H);else{var zn=a(H);zn!==!1&&(zn&&(H=zn),H.actualize&&(H=H.actualize(Z.ownerDocument||sr)),f(Z,H),R(H))}H=ei,U=yi}j(Z,U,Tt);var Cr=vL[Z.nodeName];Cr&&Cr(Z,ee)}var J=t,ke=J.nodeType,Oe=n.nodeType;if(!_){if(ke===H1)Oe===H1?Bg(t,n)||(u(t),J=IV(t,TV(n.nodeName,n.namespaceURI))):J=n;else if(ke===yL||ke===SL){if(Oe===ke)return J.nodeValue!==n.nodeValue&&(J.nodeValue=n.nodeValue),J;J=n}}if(J===n)u(t);else{if(n.isSameNode&&n.isSameNode(J))return;if(q(J,n,_),C)for(var Pe=0,et=C.length;Pe s.length,l;a&&s.push(r);try{l=i.apply(this,s)}catch(c){let d=c;if(a&&t)throw d;return r(d)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){t||(t=!0,e(s,...a))}function o(s){r(null,s)}}var FL=Ui(Q9(),1);var jn=class extends Error{constructor(e,t,n){let r=[null,null],o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(n=t,t=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?r[1]=n:(r[0]=n.slice(0,s),r[1]=n.slice(s+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=YE(t)||"1:1",this.message=typeof e=="object"?e.message:e,this.stack=typeof e=="object"?e.stack:"",this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.source=r[0],this.ruleId=r[1],this.position=o,this.actual,this.expected,this.file,this.url,this.note}};jn.prototype.file="";jn.prototype.name="";jn.prototype.reason="";jn.prototype.message="";jn.prototype.stack="";jn.prototype.fatal=null;jn.prototype.column=null;jn.prototype.line=null;jn.prototype.source=null;jn.prototype.ruleId=null;jn.prototype.position=null;var bo={basename:DV,dirname:RV,extname:MV,join:OV,sep:"/"};function DV(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');z1(i);let t=0,n=-1,r=i.length,o;if(e===void 0||e.length===0||e.length>i.length){for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let s=-1,a=e.length-1;for(;r--;)if(i.charCodeAt(r)===47){if(o){t=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(i.charCodeAt(r)===e.charCodeAt(a--)?a<0&&(n=r):(a=-1,n=s));return t===n?n=s:n<0&&(n=i.length),i.slice(t,n)}function RV(i){if(z1(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.charCodeAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.charCodeAt(0)===47?"/":".":e===1&&i.charCodeAt(0)===47?"//":i.slice(0,e)}function MV(i){z1(i);let e=i.length,t=-1,n=0,r=-1,o=0,s;for(;e--;){let a=i.charCodeAt(e);if(a===47){if(s){n=e+1;break}continue}t<0&&(s=!0,t=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||t<0||o===0||o===1&&r===t-1&&r===n+1?"":i.slice(r,t)}function OV(...i){let e=-1,t;for(;++e 0&&i.charCodeAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function FV(i,e){let t="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=i.length;){if(s 2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),r=s,o=0;continue}}else if(t.length>0){t="",n=0,r=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(r+1,s):t=i.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function z1(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}var ML={cwd:HV};function HV(){return"/"}function bh(i){return i!==null&&typeof i=="object"&&i.href&&i.origin}function OL(i){if(typeof i=="string")i=new URL(i);else if(!bh(i)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return BV(i)}function BV(i){if(i.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=i.pathname,t=-1;for(;++t {if(O||!R||!j)A(O);else{let q=o.stringify(R,j);q==null||(WV(q)?j.value=q:j.result=q),A(O,j)}});function A(O,R){O||!R?T(O):C?C(R):_(null,R)}}}function p(f){let _;o.freeze(),ty("processSync",o.Parser),iy("processSync",o.Compiler);let b=W1(f);return o.process(b,C),zL("processSync","process",_),b;function C(T){_=!0,X9(T)}}}function HL(i,e){return typeof i=="function"&&i.prototype&&(zV(i.prototype)||e in i.prototype)}function zV(i){let e;for(e in i)if(WL.call(i,e))return!0;return!1}function ty(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Parser`")}function iy(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `Compiler`")}function ny(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function BL(i){if(!B1(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function zL(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function W1(i){return UV(i)?i:new U1(i)}function UV(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function WV(i){return typeof i=="string"||(0,UL.default)(i)}function Wg(i){Object.assign(this,{Parser:t=>{let n=this.data("settings");return tT(t,Object.assign({},n,i,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var jV={tokenize:GV,partial:!0},KL={tokenize:$V,partial:!0},qL={tokenize:YV,partial:!0},yh={tokenize:QV,partial:!0},GL={tokenize:XV,partial:!0},$L={tokenize:KV,previous:QL},YL={tokenize:qV,previous:ay},ia={tokenize:VV,previous:JL},os={},oy={text:os},bc=48;for(;bc<123;)os[bc]=ia,bc++,bc===58?bc=65:bc===91&&(bc=97);os[43]=ia;os[45]=ia;os[46]=ia;os[95]=ia;os[72]=[ia,YL];os[104]=[ia,YL];os[87]=[ia,$L];os[119]=[ia,$L];function VV(i,e,t){let n=this,r,o;return s;function s(m){return!VL(m)||!JL(n.previous)||ly(n.events)?t(m):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(m))}function a(m){return VL(m)?(i.consume(m),a):m===64?(i.consume(m),l):t(m)}function l(m){return m===46?i.check(yh,u,c)(m):m===45||m===95?i.check(yh,t,d)(m):Fd(m)?(!o&&QE(m)&&(o=!0),i.consume(m),l):u(m)}function c(m){return i.consume(m),r=!0,o=void 0,l}function d(m){return i.consume(m),h}function h(m){return m===46?i.check(yh,t,c)(m):l(m)}function u(m){return r&&!o?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),e(m)):t(m)}}function KV(i,e,t){let n=this;return r;function r(s){return s!==87&&s!==119||!QL(n.previous)||ly(n.events)?t(s):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(jV,i.attempt(KL,i.attempt(qL,o),t),t)(s))}function o(s){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),e(s)}}function qV(i,e,t){let n=this;return r;function r(p){return p!==72&&p!==104||!ay(n.previous)||ly(n.events)?t(p):(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),i.consume(p),o)}function o(p){return p===84||p===116?(i.consume(p),s):t(p)}function s(p){return p===84||p===116?(i.consume(p),a):t(p)}function a(p){return p===80||p===112?(i.consume(p),l):t(p)}function l(p){return p===83||p===115?(i.consume(p),c):c(p)}function c(p){return p===58?(i.consume(p),d):t(p)}function d(p){return p===47?(i.consume(p),h):t(p)}function h(p){return p===47?(i.consume(p),u):t(p)}function u(p){return p===null||T2(p)||qu(p)||Gu(p)?t(p):i.attempt(KL,i.attempt(qL,m),t)(p)}function m(p){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),e(p)}}function GV(i,e,t){return n;function n(l){return i.consume(l),r}function r(l){return l===87||l===119?(i.consume(l),o):t(l)}function o(l){return l===87||l===119?(i.consume(l),s):t(l)}function s(l){return l===46?(i.consume(l),a):t(l)}function a(l){return l===null||Si(l)?t(l):e(l)}}function $V(i,e,t){let n,r;return o;function o(l){return l===38?i.check(GL,a,s)(l):l===46||l===95?i.check(yh,a,s)(l):l===null||T2(l)||qu(l)||l!==45&&Gu(l)?a(l):(i.consume(l),o)}function s(l){return l===46?(r=n,n=void 0,i.consume(l),o):(l===95&&(n=!0),i.consume(l),o)}function a(l){return!r&&!n?e(l):t(l)}}function YV(i,e){let t=0;return n;function n(s){return s===38?i.check(GL,e,r)(s):(s===40&&t++,s===41?i.check(yh,o,r)(s):sy(s)?e(s):XL(s)?i.check(yh,e,r)(s):(i.consume(s),n))}function r(s){return i.consume(s),n}function o(s){return t--,t<0?e(s):r(s)}}function XV(i,e,t){return n;function n(s){return i.consume(s),r}function r(s){return E2(s)?(i.consume(s),r):s===59?(i.consume(s),o):t(s)}function o(s){return sy(s)?e(s):t(s)}}function QV(i,e,t){return n;function n(o){return i.consume(o),r}function r(o){return XL(o)?(i.consume(o),r):sy(o)?e(o):t(o)}}function XL(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===95||i===126}function sy(i){return i===null||i===60||Ur(i)}function VL(i){return i===43||i===45||i===46||i===95||Fd(i)}function QL(i){return i===null||i===40||i===42||i===95||i===126||Ur(i)}function ay(i){return i===null||!E2(i)}function JL(i){return i!==47&&ay(i)}function ly(i){let e=i.length,t=!1;for(;e--;){let n=i[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){t=!0;break}if(n._gfmAutolinkLiteralWalkedInto){t=!1;break}}return i.length>0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}var JV={'"':"quot","&":"amp","<":"lt",">":"gt"};function ZL(i){return i.replace(/["&<>]/g,e);function e(t){return"&"+JV[t]+";"}}function jg(i,e){let t=ZL(ZV(i||""));if(!e)return t;let n=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),s=t.indexOf("/");return n<0||s>-1&&n>s||r>-1&&n>r||o>-1&&n>o||e.test(t.slice(0,n))?t:""}function ZV(i){let e=[],t=-1,n=0,r=0;for(;++t 55295&&o<57344){let a=i.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(i.slice(n,t),encodeURIComponent(s)),n=t+r+1,s=""),r&&(t+=r,r=0)}return e.join("")+i.slice(n)}var eK={tokenize:aK,partial:!0};function cy(){return{document:{91:{tokenize:rK,continuation:{tokenize:oK},exit:sK}},text:{91:{tokenize:nK},93:{add:"after",tokenize:tK,resolveTo:iK}}}}function tK(i,e,t){let n=this,r=n.events.length,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;r--;){let l=n.events[r][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let c=Ql(n.sliceSerialize({start:s.end,end:n.now()}));return c.charCodeAt(0)!==94||!o.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function iK(i,e){let t=i.length,n;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){n=i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},i[i.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[i[t+1],i[t+2],["enter",r,e],i[t+3],i[t+4],["enter",o,e],["exit",o,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],i[i.length-2],i[i.length-1],["exit",r,e]];return i.splice(t,i.length-t+1,...l),i}function nK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o=0,s;return a;function a(u){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?t(u):(i.enter("gfmFootnoteCallMarker"),i.consume(u),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(u){let m;return u===null||u===91||o++>999?t(u):u===93?s?(i.exit("chunkString"),m=i.exit("gfmFootnoteCallString"),r.includes(Ql(n.sliceSerialize(m)))?h(u):t(u)):t(u):(i.consume(u),Ur(u)||(s=!0),u===92?d:c)}function d(u){return u===91||u===92||u===93?(i.consume(u),o++,c):c(u)}function h(u){return i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e}}function rK(i,e,t){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(f){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(f){return f===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),d):t(f)}function d(f){let _;return f===null||f===91||s>999?t(f):f===93?a?(_=i.exit("gfmFootnoteDefinitionLabelString"),o=Ql(n.sliceSerialize(_)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(f),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),m):t(f):Si(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),s++,d):(i.enter("chunkString").contentType="string",h(f))}function h(f){return f===null||Si(f)||f===91||f===93||s>999?(i.exit("chunkString"),d(f)):(Ur(f)||(a=!0),s++,i.consume(f),f===92?u:h)}function u(f){return f===91||f===92||f===93?(i.consume(f),s++,h):h(f)}function m(f){return f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),Qn(i,p,"gfmFootnoteDefinitionWhitespace")):t(f)}function p(f){return r.includes(o)||r.push(o),e(f)}}function oK(i,e,t){return i.check(ZE,e,i.attempt(eK,e,t))}function sK(i){i.exit("gfmFootnoteDefinition")}function aK(i,e,t){let n=this;return Qn(i,r,"gfmFootnoteDefinitionIndent",4+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function dy(i={}){let e=i.singleTilde,t={tokenize:r,resolveAll:n};return e==null&&(e=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}};function n(o,s){let a=-1;for(;++a 1?a(m):(o.consume(m),d++,u);if(d<2&&!e)return a(m);let f=o.exit("strikethroughSequenceTemporary"),_=I2(m);return f._open=!_||_===2&&!!p,f._close=!p||p===2&&!!_,s(m)}}}var hy={flow:{null:{tokenize:cK,resolve:lK}}},eN={tokenize:dK,partial:!0};function lK(i,e){let t=-1,n,r,o,s,a,l,c;for(;++t =4?ee(U):(n._gfmTableDynamicInterruptHack=!0,B.check(n.parser.constructs.flow,function(Tt){return n._gfmTableDynamicInterruptHack=!1,ee(Tt)},function(Tt){return n._gfmTableDynamicInterruptHack=!1,Z(Tt)})(U))}}}function dK(i,e,t){let n=0;return r;function r(s){return i.enter("check"),i.consume(s),o}function o(s){return s===-1||s===32?(i.consume(s),n++,n===4?e:o):s===null||Ur(s)?e(s):t(s)}}var hK={tokenize:uK},uy={text:{91:hK}};function uK(i,e,t){let n=this;return r;function r(a){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(a):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),o)}function o(a){return Ur(a)?(i.enter("taskListCheckValueUnchecked"),i.consume(a),i.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(i.enter("taskListCheckValueChecked"),i.consume(a),i.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(i.enter("taskListCheckMarker"),i.consume(a),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),i.check({tokenize:mK},e,t)):t(a)}}function mK(i,e,t){let n=this;return Qn(i,r,"whitespace");function r(o){let s=n.events[n.events.length-1];return(s&&s[1].type==="whitespace"||Si(o))&&o!==null?e(o):t(o)}}function tN(i){return XE([oy,cy(),dy(i),hy,uy])}function Sh(i,e){let t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length);return n}function my(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var mn=function(i){if(i==null)return _K;if(typeof i=="string")return gK(i);if(typeof i=="object")return Array.isArray(i)?pK(i):fK(i);if(typeof i=="function")return Vg(i);throw new Error("Expected function, string, or object as test")};function pK(i){let e=[],t=-1;for(;++t ":""))+")"})),u;function u(){var m=[],p,f,_;if((!e||r(a,l,c[c.length-1]||null))&&(m=vK(t(a,c)),m[0]===py))return m;if(a.children&&m[0]!==nN)for(f=(n?a.children.length:-1)+o,_=c.concat(a);f>-1&&f 0?{type:"text",value:w}:void 0),w!==!1&&(f!==C&&b.push({type:"text",value:h.value.slice(f,C)}),Array.isArray(w)?b.push(...w):w&&b.push(w),f=C+T[0].length),!m.global)break;T=m.exec(h.value)}return C===void 0?(b=[h],_--):(f i}var fy="phrasing",gy=["autolink","link","image","label"],aN={transforms:[TK],enter:{literalAutolink:SK,literalAutolinkEmail:_y,literalAutolinkHttp:_y,literalAutolinkWww:_y},exit:{literalAutolink:EK,literalAutolinkEmail:xK,literalAutolinkHttp:CK,literalAutolinkWww:wK}},lN={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:gy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:gy}]};function SK(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function _y(i){this.config.enter.autolinkProtocol.call(this,i)}function CK(i){this.config.exit.autolinkProtocol.call(this,i)}function wK(i){this.config.exit.data.call(this,i);let e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(i)}function xK(i){this.config.exit.autolinkEmail.call(this,i)}function EK(i){this.exit(i)}function TK(i){sN(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,IK],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,kK]],{ignore:["link","linkReference"]})}function IK(i,e,t,n,r){let o="";if(!cN(r)||(/^w/i.test(e)&&(t=e+t,e="",o="http://"),!AK(t)))return!1;let s=LK(t+n);if(!s[0])return!1;let a={type:"link",title:null,url:o+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function kK(i,e,t,n){return!cN(n,!0)||/[_-\d]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+t,children:[{type:"text",value:e+"@"+t}]}}function AK(i){let e=i.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function LK(i){let e=/[!"&'),.:;<>?\]}]+$/.exec(i),t,n,r,o;if(e)for(i=i.slice(0,e.index),o=e[0],t=o.indexOf(")"),n=Sh(i,"("),r=Sh(i,")");t!==-1&&n>r;)i+=o.slice(0,t+1),o=o.slice(t+1),t=o.indexOf(")"),r++;return[i,o]}function cN(i,e){let t=i.input.charCodeAt(i.index-1);return(i.index===0||qu(t)||Gu(t))&&(!e||t!==47)}function vy(i){return i.label||!i.identifier?i.label||"":eT(i.identifier)}function Dn(i){let e=i||{},t=e.now||{},n=e.lineShift||0,r=t.line||1,o=t.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:r,column:o},lineShift:n}}function a(c){n+=c}function l(c=""){let d=c.split(/\r?\n|\r/g),h=d[d.length-1];return r+=d.length-1,o=d.length===1?o+h.length:1+h.length+n,c}}function qg(i,e,t){let n=e.indexStack,r=i.children||[],o=Dn(t),s=[],a=-1;for(n.push(-1);++a `.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function oF(i,e){return i.bogusComments?""+Sa(e.value,Object.assign({},i.entities,{subset:[">"]}))+">":"|--!>|";function t(n){return Sa(n,Object.assign({},i.entities,{subset:["<",">"]}))}}function sF(i){return""}function yv(i,e,t,n){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Sa(e.value,Object.assign({},i.entities,{subset:["<","&"]}))}function aF(i,e,t,n){return i.dangerous?e.value:yv(i,e,t,n)}var lF={comment:oF,doctype:sF,element:NJ,raw:aF,root:cF,text:yv},LJ={}.hasOwnProperty;function DS(i,e,t,n){if(!e||!e.type)throw new Error("Expected node, not `"+e+"`");if(!LJ.call(lF,e.type))throw new Error("Cannot compile unknown node `"+e.type+"`");return lF[e.type](i,e,t,n)}function cF(i,e){let t=[],n=e&&e.children||[],r=-1;for(;++r ")),a.push(d),!s&&(!o||!o.closing(e,t,n))&&a.push(""+e.tagName+">"),a.join("")}function DJ(i,e){let t=[],n=-1,r,o,s;for(r in e)e[r]!==void 0&&e[r]!==null&&(o=RJ(i,r,e[r]),o&&t.push(o));for(;++n Sh(t,i.alternative)&&(r=i.alternative),o=r+Sa(t,Object.assign({},i.entities,{subset:(r==="'"?C0.single:C0.double)[i.schema.space==="html"?i.valid:1][i.safe],attribute:!0}))+r),s+(o&&"="+o))}function RS(i,e={}){let t=e.quote||'"',n=t==='"'?"'":'"';if(t!=='"'&&t!=="'")throw new Error("Invalid quote `"+t+"`, expected `'` or `\"`");let r={valid:e.allowParseErrors?0:1,safe:e.allowDangerousCharacters?0:1,schema:e.space==="svg"?Vn:xo,omit:e.omitOptionalTags?XP:void 0,quote:t,alternative:n,smart:e.quoteSmart,unquoted:e.preferUnquoted,tight:e.tightAttributes,upperDoctype:e.upperDoctype,tightDoctype:e.tightDoctype,bogusComments:e.bogusComments,tightLists:e.tightCommaSeparatedLists,tightClose:e.tightSelfClosing,collapseEmpty:e.collapseEmptyAttributes,dangerous:e.allowDangerousHtml,voids:e.voids||B_.concat(),entities:e.entities||{},close:e.closeSelfClosing,closeEmpty:e.closeEmptyElements};return DS(r,Array.isArray(i)?{type:"root",children:i}:i,null,null)}function Sv(i){let e=this.data("settings"),t=Object.assign({},e,i);Object.assign(this,{Compiler:n});function n(r){return RS(r,t)}}var MJ={inline:["$","$"],display:["$$","$$"]};function OJ(i,e){e===void 0&&(e=MJ);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),n=0;n l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",OJ(s).textContent),i.preventDefault()}}});function MS(i,e){let t=typeof e=="boolean"?e:e?e.force:!1;return Rn(i,n),i;function n(r){t?delete r.position:r.position=void 0}}wr();Bs();Me();Mi();ht();be();qe();var PJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FJ=function(i,e){return function(t,n){e(t,n,i)}},Cv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wv=new Ne("selectionAnchorSet",!1),Ca=class hF{static get(e){return e.getContribution(hF.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=wv.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new pi().appendText(g("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Kt(g("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ca.ID="editor.contrib.selectionAnchorController";Ca=PJ([FJ(1,we)],Ca);var OS=class extends K{constructor(){super({id:"editor.action.setSelectionAnchor",label:g("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2080),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.setSelectionAnchor()})}},PS=class extends K{constructor(){super({id:"editor.action.goToSelectionAnchor",label:g("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:wv})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},FS=class extends K{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:g("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2089),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},HS=class extends K{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:g("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Se(Ca.ID,Ca,4);F(OS);F(PS);F(FS);F(HS);ct();re();Me();St();Ie();Mi();ht();rl();hn();be();mi();An();cn();var HJ=pe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),BS=class extends K{constructor(){super({id:"editor.action.jumpToBracket",label:g("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.jumpToBracket()}},zS=class extends K{constructor(){super({id:"editor.action.selectToBracket",label:g("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=bs.get(t))===null||r===void 0||r.selectToBracket(o)}},US=class extends K{constructor(){super({id:"editor.action.removeBrackets",label:g("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.removeBrackets(this.id)}},WS=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},bs=class i extends Y{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new kt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new ye(s.lineNumber,s.column,s.lineNumber,s.column):new ye(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(k.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let h=a;a=l,l=h}}a&&l&&n.push(new ye(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let h=0,u=e.length;h1&&o.sort(ie.compare);let a=[],l=0,c=0,d=r.length;for(let h=0,u=o.length;h0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};F(KS);hT();Sn();Me();En();ht();be();mi();qe();var BJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hc="9_cutcopypaste",zJ=Ga||document.queryCommandSupported("cut"),uF=Ga||document.queryCommandSupported("copy"),UJ=typeof navigator.clipboard=="undefined"||cT?document.queryCommandSupported("paste"):!0;function $S(i){return i.register(),i}var WJ=zJ?$S(new gf({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ga?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.cutLabel","Cut"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1}]})):void 0,jJ=uF?$S(new gf({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ga?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.copyLabel","Copy"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;qr.appendMenuItem(ae.MenubarEditMenu,{submenu:ae.MenubarCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:Hc,order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1,when:G.and(G.notEquals("resourceScheme","output"),I.editorTextFocus)});qr.appendMenuItem(ae.EditorTitleContext,{submenu:ae.EditorTitleContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});qr.appendMenuItem(ae.ExplorerContext,{submenu:ae.ExplorerContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});var qS=UJ?$S(new gf({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ga?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4}]})):void 0,GS=class extends K{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:g("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(e9.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),e9.forceCopyWithSyntaxHighlighting=!1)}};function mF(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(_t).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}mF(WJ,"cut");mF(jJ,"copy");qS&&(qS.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(_t),n=i.get(qs),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&rf?(()=>BJ(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=mk.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),qS.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));uF&&F(GS);Me();Bt();Me();ht();Dt();Gt();it();re();wn();Ie();Mi();ut();Ya();g1();be();Ci();mc();Qa();it();var VJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ee=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};Ee.sep=".";Ee.None=new Ee("@@none@@");Ee.Empty=new Ee("");Ee.QuickFix=new Ee("quickfix");Ee.Refactor=new Ee("refactor");Ee.RefactorExtract=Ee.Refactor.append("extract");Ee.RefactorInline=Ee.Refactor.append("inline");Ee.RefactorMove=Ee.Refactor.append("move");Ee.RefactorRewrite=Ee.Refactor.append("rewrite");Ee.Source=new Ee("source");Ee.SourceOrganizeImports=Ee.Source.append("organizeImports");Ee.SourceFixAll=Ee.Source.append("fixAll");Ee.SurroundWith=Ee.Refactor.append("surround");var Xi;(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(Xi||(Xi={}));function pF(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>gF(e,t,i.include))||!i.includeSourceActions&&Ee.Source.contains(e))}function fF(i,e){let t=e.kind?new Ee(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>gF(t,n,i.include))||!i.includeSourceActions&&t&&Ee.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function gF(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var Tl=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ee(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},Tv=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return VJ(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){bt(r)}n&&(this.action.edit=n.edit)}return this})}};var Iv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kv="editor.action.codeAction",Wh="editor.action.quickFix",Av="editor.action.autoFix",Lv="editor.action.refactor",Nv="editor.action.sourceAction",x0="editor.action.organizeImports",E0="editor.action.fixAll",YS=class i extends Y{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Xt(e.diagnostics)?Xt(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Xt(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ee.QuickFix.contains(new Ee(e.kind))&&!!e.isPreferred)}},_F={actions:[],documentation:void 0};function T0(i,e,t,n,r,o){var s;return Iv(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new _k(e,o),d=KJ(i,e,a),h=new W,u=d.map(p=>Iv(this,void 0,void 0,function*(){try{r.report(p);let f=yield p.provideCodeActions(e,t,l,c.token);if(f&&h.add(f),c.token.isCancellationRequested)return _F;let _=((f==null?void 0:f.actions)||[]).filter(C=>C&&fF(a,C)),b=GJ(p,_,a.include);return{actions:_.map(C=>new Tv(C,p)),documentation:b}}catch(f){if(Wr(f))throw f;return bt(f),_F}})),m=i.onDidChange(()=>{let p=i.all(e);Uo(p,d)||c.cancel()});try{let p=yield Promise.all(u),f=p.map(b=>b.actions).flat(),_=[...Wo(p.map(b=>b.documentation)),...qJ(i,e,n,f)];return new YS(f,_,h)}finally{m.dispose(),c.dispose()}})}function KJ(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>pF(t,new Ee(r))):!0)}function*qJ(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function GJ(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Ee(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Ee(r.kind)))return o.command}}var w0;(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(w0||(w0={}));function vF(i,e,t,n,r=ze.None){var o;return Iv(this,void 0,void 0,function*(){let s=i.get(Wf),a=i.get(Pt),l=i.get(Tn),c=i.get(ri);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==w0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let h=$J(d);c.error(typeof h=="string"?h:g("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function $J(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}Je.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return Iv(this,void 0,void 0,function*(){if(!(e instanceof Qe))throw Jl();let{codeActionProvider:o}=i.get(le),s=i.get(Ri).getModel(e);if(!s)throw Jl();let a=ye.isISelection(t)?ye.liftSelection(t):k.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Jl();let l=typeof n=="string"?new Ee(n):void 0,c=yield T0(o,s,a,{type:1,triggerAction:Xi.Default,filter:{includeSourceActions:!0,include:l}},Qo.None,ze.None),d=[],h=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let u=0;u u.action)}finally{setTimeout(()=>c.dispose(),100)}})});be();qe();gt();it();O2();re();St();ut();O2();un();var YJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},XJ=function(i,e){return function(t,n){e(t,n,i)}},I0=class bF{constructor(e){this.keybindingService=e}getResolver(){let e=new Ud(()=>this.keybindingService.getKeybindings().filter(t=>bF.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===x0?n={kind:Ee.SourceOrganizeImports.value}:t.command===E0&&(n={kind:Ee.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Tl.fromUser(n,{kind:Ee.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Ee(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};I0.codeActionCommands=[Lv,kv,Nv,x0,E0];I0=YJ([XJ(0,mt)],I0);sn();be();An();var m_e=pe("symbolIcon.arrayForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p_e=pe("symbolIcon.booleanForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f_e=pe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g_e=pe("symbolIcon.colorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),__e=pe("symbolIcon.constantForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v_e=pe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b_e=pe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y_e=pe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S_e=pe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C_e=pe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w_e=pe("symbolIcon.fileForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x_e=pe("symbolIcon.folderForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E_e=pe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T_e=pe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I_e=pe("symbolIcon.keyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k_e=pe("symbolIcon.keywordForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A_e=pe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L_e=pe("symbolIcon.moduleForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N_e=pe("symbolIcon.namespaceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D_e=pe("symbolIcon.nullForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R_e=pe("symbolIcon.numberForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M_e=pe("symbolIcon.objectForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O_e=pe("symbolIcon.operatorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P_e=pe("symbolIcon.packageForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F_e=pe("symbolIcon.propertyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),H_e=pe("symbolIcon.referenceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B_e=pe("symbolIcon.snippetForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z_e=pe("symbolIcon.stringForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),U_e=pe("symbolIcon.structForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),W_e=pe("symbolIcon.textForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),j_e=pe("symbolIcon.typeParameterForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),V_e=pe("symbolIcon.unitForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),K_e=pe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));be();var yF=Object.freeze({kind:Ee.Empty,title:g("codeAction.widget.id.more","More Actions...")}),QJ=Object.freeze([{kind:Ee.QuickFix,title:g("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Ee.RefactorExtract,title:g("codeAction.widget.id.extract","Extract..."),icon:Re.wrench},{kind:Ee.RefactorInline,title:g("codeAction.widget.id.inline","Inline..."),icon:Re.wrench},{kind:Ee.RefactorRewrite,title:g("codeAction.widget.id.convert","Rewrite..."),icon:Re.wrench},{kind:Ee.RefactorMove,title:g("codeAction.widget.id.move","Move..."),icon:Re.wrench},{kind:Ee.SurroundWith,title:g("codeAction.widget.id.surround","Surround With..."),icon:Re.symbolSnippet},{kind:Ee.Source,title:g("codeAction.widget.id.source","Source Action..."),icon:Re.symbolFile},yF]);function SF(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:yF,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=QJ.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Ee(o.action.kind):Ee.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}gt();bk();sn();wt();re();er();ii();ik();be();un();var JJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ZJ=function(i,e){return function(t,n){e(t,n,i)}},jh;(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(jh||(jh={}));var wa=class CF extends Y{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new De),this.onClick=this._onClick.event,this._state=jh.Hidden,this._domNode=te("div.lightBulbWidget"),this._register(Vf.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(bT(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=xn(this._domNode),s=this._editor.getOption(64),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber {(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Nt.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=ji((n=t.lookupKeybinding(Av))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=ji((r=t.lookupKeybinding(Wh))===null||r===void 0?void 0:r.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(48),d=o.getLineContent(s),h=h1(d,l),u=c.spaceWidth*h>22,m=f=>f>2&&this._editor.getTopForLineNumber(f)===this._editor.getTopForLineNumber(f-1),p=s;if(!u){if(s>1&&!m(s-1))p-=1;else if(!m(s+1))p+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new jh.Showing(e,t,n,{position:{lineNumber:p,column:1},preference:CF._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==jh.Hidden&&(this.state=jh.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...je.asClassNameArray(Re.lightBulb)),this._domNode.classList.add(...je.asClassNameArray(Re.lightbulbAutofix)),this._preferredKbLabel)){this.title=g("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...je.asClassNameArray(Re.lightbulbAutofix)),this._domNode.classList.add(...je.asClassNameArray(Re.lightBulb)),this._quickFixKbLabel?this.title=g("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=g("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};wa.ID="editor.contrib.lightbulbWidget";wa._posPref=[0];wa=JJ([ZJ(1,mt)],wa);wr();ct();re();Me();Ie();be();qe();var eZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tZ=function(i,e){return function(t,n){e(t,n,i)}},Qi=class XS{static get(e){return e.getContribution(XS.ID)}constructor(e,t){this._messageWidget=new li,this._messageListeners=new W,this._editor=e,this._visible=XS.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Kt(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Dv(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new jo(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new k(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Dv.fadeOut(this._messageWidget.value))}};Qi.ID="editor.contrib.messageController";Qi.MESSAGE_VISIBLE=new Ne("messageVisible",!1,g("messageVisible","Whether the editor is currently showing an inline message"));Qi=eZ([tZ(1,we)],Qi);var iZ=ni.bindToContribution(Qi.get);ge(new iZ({id:"leaveEditorMessage",precondition:Qi.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));var Dv=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Se(Qi.ID,Qi,4);be();gt();re();be();gt();sn();re();Sn();er();be();un();An();var wF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QS=function(i,e){return function(t,n){e(t,n,i)}},tC="acceptSelectedCodeAction",iC="previewSelectedCodeAction",JS=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},ZS=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new Gf(e,of);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=je.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Ko(e.group.icon.color.id))):(n.icon.className=je.asClassName(Re.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=xF(e.label),n.keybinding.set(e.keybinding),ET(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(tC))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(iC))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=g({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=g({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};ZS=wF([QS(1,mt)],ZS);var eC=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Rv=class extends UIEvent{constructor(){super("previewSelectedAction")}},Mv=class extends Y{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new qf(e,this.domNode,a,[new ZS(t,this._keybindingService),new JS],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?xF(l==null?void 0:l.label):"";return l.disabled&&(c=g({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>g({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Ik),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let h=document.getElementById(this._list.getElementID(d));if(h){h.style.width="auto";let u=h.getBoundingClientRect().width;return h.style.width="",u}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new Rv:new eC;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Rv):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Mv=wF([QS(4,ol),QS(5,mt)],Mv);function xF(i){return i.replace(/\r\n|\r|\n/g," ")}mi();qe();ac();st();var nZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nC=function(i,e){return function(t,n){e(t,n,i)}},Bc={Visible:new Ne("codeActionMenuVisible",!1,g("codeActionMenuVisible","Whether the action widget list is visible"))},Il=Zn("actionWidgetService"),zc=class extends Y{get isVisible(){return Bc.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new li)}show(e,t,n,r,o,s,a){let l=Bc.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Mv,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new W,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(jt(l,Jn.MOUSE_DOWN,p=>p.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(jt(d,Jn.POINTER_MOVE,()=>d.remove())),s.add(jt(d,Jn.MOUSE_DOWN,()=>d.remove()));let h=0;if(n.length){let p=this._createActionBar(".action-widget-action-bar",n);p&&(o.appendChild(p.getContainer().parentElement),s.add(p),h=p.getContainer().offsetWidth)}let u=(r=this._list.value)===null||r===void 0?void 0:r.layout(h);o.style.width=`${u}px`;let m=s.add(zs(e));return s.add(m.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=te(e),r=new kr(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};zc=nZ([nC(0,ol),nC(1,we),nC(2,Ce)],zc);ir(Il,zc,1);var k0=100+1e3;Ft(class extends Gr{constructor(){super({id:"hideCodeActionWidget",title:{value:g("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Bc.Visible,keybinding:{weight:k0,primary:9,secondary:[1033]}})}run(i){i.get(Il).hide()}});Ft(class extends Gr{constructor(){super({id:"selectPrevCodeAction",title:{value:g("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusPrevious()}});Ft(class extends Gr{constructor(){super({id:"selectNextCodeAction",title:{value:g("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusNext()}});Ft(class extends Gr{constructor(){super({id:tC,title:{value:g("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected()}});Ft(class extends Gr{constructor(){super({id:iC,title:{value:g("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:2051}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected(!0)}});Ci();an();qe();st();mc();ct();it();wt();re();Tr();qe();mc();var rC=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},rZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},Vh,sC=new Ne("supportedCodeAction",""),oC=class extends Y{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new jo),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>qd(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Xi.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}},Uc;(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(Wr(s))return oZ;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Uc||(Uc={}));var oZ=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Ov=class extends Y{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new li),this._state=Uc.Empty,this._onDidChangeState=this._register(new De),this.onDidChangeState=this._onDidChangeState.event,Vh.set(this,!1),this._supportedCodeActions=sC.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){rC(this,Vh,"f")||(rZ(this,Vh,!0,"f"),super.dispose(),this.setState(Uc.Empty,!0))}_update(){if(rC(this,Vh,"f"))return;this._codeActionOracle.value=void 0,this.setState(Uc.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new oC(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Uc.Empty);return}let o=Ht(s=>T0(this._registry,e,n.selection,n.trigger,Qo.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Uc.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Xi.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!rC(this,Vh,"f")&&this._onDidChangeState.fire(e))}};Vh=new WeakMap;var sZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xa=function(i,e){return function(t,n){e(t,n,i)}},Pv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},aZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},lZ=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},Fv,ys=class EF extends Y{static get(e){return e.getContribution(EF.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new li),this._showDisabled=!1,Fv.set(this,!1),this._editor=e,this._model=this._register(new Ov(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Ud(()=>{let h=this._editor.getContribution(wa.ID);return h&&this._register(h.onClick(u=>this.showCodeActionList(u.actions,u,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=r.createInstance(I0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){aZ(this,Fv,!0,"f"),super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Qi.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return Pv(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(vF,e,w0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Xi.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return Pv(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){Be(d);return}if(!lZ(this,Fv,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let h=this.tryGetValidActionToApply(e.trigger,c);if(h){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(h,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(u&&u.action.disabled){(s=Qi.get(this._editor))===null||s===void 0||s.showMessage(u.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Qi.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return Pv(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Pv(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,SF(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=xn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:g("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:g("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};Fv=new WeakMap;ys.ID="editor.contrib.codeActionController";ys=sZ([xa(1,v1),xa(2,we),xa(3,Ce),xa(4,le),xa(5,Gs),xa(6,Pt),xa(7,nt),xa(8,Il),xa(9,Ce)],ys);function A0(i){return G.regex(sC.keys()[0],new RegExp("(\\s|^)"+Ws(i.value)+"\\b"))}var aC={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:g("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:g("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[g("args.schema.apply.first","Always apply the first returned code action."),g("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),g("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:g("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function Wc(i,e,t,n,r=Xi.Default){if(i.hasModel()){let o=ys.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var Hv=class extends K{constructor(){super({id:Wh,label:g("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:G.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:2137,weight:100}})}run(e,t){return Wc(t,g("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Xi.QuickFix)}},Bv=class extends ni{constructor(){super({id:kv,precondition:G.and(I.writable,I.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:aC}]}})}runEditorCommand(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Empty,apply:"ifSingle"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):g("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?g("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):g("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},zv=class extends K{constructor(){super({id:Lv,label:g("refactor.label","Refactor..."),alias:"Refactor...",precondition:G.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:G.and(I.writable,A0(Ee.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Refactor,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):g("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?g("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):g("editor.action.refactor.noneMessage","No refactorings available"),{include:Ee.Refactor.contains(r.kind)?r.kind:Ee.None,onlyIncludePreferredActions:r.preferred},r.apply,Xi.Refactor)}},Uv=class extends K{constructor(){super({id:Nv,label:g("source.label","Source Action..."),alias:"Source Action...",precondition:G.and(I.writable,I.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:G.and(I.writable,A0(Ee.Source))},description:{description:"Source Action...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Source,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):g("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?g("editor.action.source.noneMessage.preferred","No preferred source actions available"):g("editor.action.source.noneMessage","No source actions available"),{include:Ee.Source.contains(r.kind)?r.kind:Ee.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Xi.SourceAction)}},Wv=class extends K{constructor(){super({id:x0,label:g("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:G.and(I.writable,A0(Ee.SourceOrganizeImports)),kbOpts:{kbExpr:I.textInputFocus,primary:1581,weight:100}})}run(e,t){return Wc(t,g("editor.action.organize.noneMessage","No organize imports action available"),{include:Ee.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Xi.OrganizeImports)}},jv=class extends K{constructor(){super({id:E0,label:g("fixAll.label","Fix All"),alias:"Fix All",precondition:G.and(I.writable,A0(Ee.SourceFixAll))})}run(e,t){return Wc(t,g("fixAll.noneMessage","No fix all action available"),{include:Ee.SourceFixAll,includeSourceActions:!0},"ifSingle",Xi.FixAll)}},Vv=class extends K{constructor(){super({id:Av,label:g("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:G.and(I.writable,A0(Ee.QuickFix)),kbOpts:{kbExpr:I.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Wc(t,g("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ee.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Xi.AutoFix)}};be();tI();rc();Se(ys.ID,ys,3);Se(wa.ID,wa,4);F(Hv);F(zv);F(Uv);F(Wv);F(Vv);F(jv);ge(new Bv);tr.as(Cf.Configuration).registerConfiguration(Object.assign(Object.assign({},gk),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:g("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));Bs();Me();Ie();ht();ln();Zo();St();Ie();Mi();var Ea=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s =65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=o.getLineContent(a),u=o.getLineContent(c),m=h.lastIndexOf(t,l-1+t.length),p=u.indexOf(n,d-1-n.length);if(m!==-1&&p!==-1)if(a===c)h.substring(m+t.length,p).indexOf(n)>=0&&(m=-1,p=-1);else{let _=h.substring(m+t.length),b=u.substring(0,p);(_.indexOf(n)>=0||b.indexOf(n)>=0)&&(m=-1,p=-1)}let f;m!==-1&&p!==-1?(r&&m+t.length 0&&u.charCodeAt(p-1)===32&&(n=" "+n,p-=1),f=i._createRemoveBlockCommentOperations(new k(a,m+t.length+1,c,p+1),t,n)):(f=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=f.length===1?n:null);for(let _ of f)s.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return k.isEmpty(e)?r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(at.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return k.isEmpty(e)?o.push(at.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(at.insert(new ie(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(at.insert(new ie(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new ye(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new ye(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}};Bt();Zo();St();Ie();Mi();var Kv=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;c \``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function oF(i,e){return i.bogusComments?""+Sa(e.value,Object.assign({},i.entities,{subset:[">"]}))+">":"|--!>|";function t(n){return Sa(n,Object.assign({},i.entities,{subset:["<",">"]}))}}function sF(i){return""}function yv(i,e,t,n){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Sa(e.value,Object.assign({},i.entities,{subset:["<","&"]}))}function aF(i,e,t,n){return i.dangerous?e.value:yv(i,e,t,n)}var lF={comment:oF,doctype:sF,element:NJ,raw:aF,root:cF,text:yv},LJ={}.hasOwnProperty;function DS(i,e,t,n){if(!e||!e.type)throw new Error("Expected node, not `"+e+"`");if(!LJ.call(lF,e.type))throw new Error("Cannot compile unknown node `"+e.type+"`");return lF[e.type](i,e,t,n)}function cF(i,e){let t=[],n=e&&e.children||[],r=-1;for(;++r ")),a.push(d),!s&&(!o||!o.closing(e,t,n))&&a.push(""+e.tagName+">"),a.join("")}function DJ(i,e){let t=[],n=-1,r,o,s;for(r in e)e[r]!==void 0&&e[r]!==null&&(o=RJ(i,r,e[r]),o&&t.push(o));for(;++n Sh(t,i.alternative)&&(r=i.alternative),o=r+Sa(t,Object.assign({},i.entities,{subset:(r==="'"?C0.single:C0.double)[i.schema.space==="html"?i.valid:1][i.safe],attribute:!0}))+r),s+(o&&"="+o))}function RS(i,e={}){let t=e.quote||'"',n=t==='"'?"'":'"';if(t!=='"'&&t!=="'")throw new Error("Invalid quote `"+t+"`, expected `'` or `\"`");let r={valid:e.allowParseErrors?0:1,safe:e.allowDangerousCharacters?0:1,schema:e.space==="svg"?Vn:xo,omit:e.omitOptionalTags?XP:void 0,quote:t,alternative:n,smart:e.quoteSmart,unquoted:e.preferUnquoted,tight:e.tightAttributes,upperDoctype:e.upperDoctype,tightDoctype:e.tightDoctype,bogusComments:e.bogusComments,tightLists:e.tightCommaSeparatedLists,tightClose:e.tightSelfClosing,collapseEmpty:e.collapseEmptyAttributes,dangerous:e.allowDangerousHtml,voids:e.voids||B_.concat(),entities:e.entities||{},close:e.closeSelfClosing,closeEmpty:e.closeEmptyElements};return DS(r,Array.isArray(i)?{type:"root",children:i}:i,null,null)}function Sv(i){let e=this.data("settings"),t=Object.assign({},e,i);Object.assign(this,{Compiler:n});function n(r){return RS(r,t)}}var MJ={inline:["$","$"],display:["$$","$$"]};function OJ(i,e){e===void 0&&(e=MJ);for(var t=i.querySelectorAll(".katex-mathml + .katex-html"),n=0;n l instanceof Text?l.textContent:l.outerHTML).join("");t.setData("text/html",a),t.setData("text/plain",OJ(s).textContent),i.preventDefault()}}});function MS(i,e){let t=typeof e=="boolean"?e:e?e.force:!1;return Rn(i,n),i;function n(r){t?delete r.position:r.position=void 0}}wr();Bs();Me();Mi();ht();be();qe();var PJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FJ=function(i,e){return function(t,n){e(t,n,i)}},Cv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},wv=new Ne("selectionAnchorSet",!1),Ca=class hF{static get(e){return e.getContribution(hF.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=wv.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new pi().appendText(g("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Kt(g("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Ca.ID="editor.contrib.selectionAnchorController";Ca=PJ([FJ(1,we)],Ca);var OS=class extends K{constructor(){super({id:"editor.action.setSelectionAnchor",label:g("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2080),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.setSelectionAnchor()})}},PS=class extends K{constructor(){super({id:"editor.action.goToSelectionAnchor",label:g("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:wv})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.goToSelectionAnchor()})}},FS=class extends K{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:g("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:It(2089,2089),weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}},HS=class extends K{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:g("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:wv,kbOpts:{kbExpr:I.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return Cv(this,void 0,void 0,function*(){(n=Ca.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}};Se(Ca.ID,Ca,4);F(OS);F(PS);F(FS);F(HS);ct();re();Me();St();Ie();Mi();ht();rl();hn();be();mi();An();cn();var HJ=pe("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),BS=class extends K{constructor(){super({id:"editor.action.jumpToBracket",label:g("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.jumpToBracket()}},zS=class extends K{constructor(){super({id:"editor.action.selectToBracket",label:g("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(r=bs.get(t))===null||r===void 0||r.selectToBracket(o)}},US=class extends K{constructor(){super({id:"editor.action.removeBrackets",label:g("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:I.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=bs.get(t))===null||n===void 0||n.removeBrackets(this.id)}},WS=class{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}},bs=class i extends Y{static get(e){return e.getContribution(i.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new kt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{let r=n.getStartPosition(),o=e.bracketPairs.matchBracket(r),s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{let l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new ye(s.lineNumber,s.column,s.lineNumber,s.column):new ye(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(r=>{let o=r.getStartPosition(),s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){let c=t.bracketPairs.findNextBracket(o);c&&c.range&&(s=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(k.compareRangesUsingStarts);let[c,d]=s;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(o)){let h=a;a=l,l=h}}a&&l&&n.push(new ye(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(n=>{let r=n.getPosition(),o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let n of this._lastBracketsData){let r=n.brackets;r&&(e[t++]={range:r[0],options:n.options},e[t++]={range:r[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),n=t.getVersionId(),r=[];this._lastVersionId===n&&(r=this._lastBracketsData);let o=[],s=0;for(let h=0,u=e.length;h1&&o.sort(ie.compare);let a=[],l=0,c=0,d=r.length;for(let h=0,u=o.length;h0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}};F(KS);hT();Sn();Me();En();ht();be();mi();qe();var BJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Hc="9_cutcopypaste",zJ=Ga||document.queryCommandSupported("cut"),uF=Ga||document.queryCommandSupported("copy"),UJ=typeof navigator.clipboard=="undefined"||cT?document.queryCommandSupported("paste"):!0;function $S(i){return i.register(),i}var WJ=zJ?$S(new gf({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ga?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.cutLabel","Cut"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.cutLabel","Cut"),when:I.writable,order:1}]})):void 0,jJ=uF?$S(new gf({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ga?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.copyLabel","Copy"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;qr.appendMenuItem(ae.MenubarEditMenu,{submenu:ae.MenubarCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:Hc,order:3});qr.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1,when:$.and($.notEquals("resourceScheme","output"),I.editorTextFocus)});qr.appendMenuItem(ae.EditorTitleContext,{submenu:ae.EditorTitleContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});qr.appendMenuItem(ae.ExplorerContext,{submenu:ae.ExplorerContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});var qS=UJ?$S(new gf({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ga?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:g({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:ae.EditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4},{menuId:ae.CommandPalette,group:"",title:g("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:ae.SimpleEditorContext,group:Hc,title:g("actions.clipboard.pasteLabel","Paste"),when:I.writable,order:4}]})):void 0,GS=class extends K{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:g("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(e9.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),e9.forceCopyWithSyntaxHighlighting=!1)}};function mF(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{let r=t.get(_t).getFocusedCodeEditor();if(r&&r.hasTextFocus()){let o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>(document.execCommand(e),!0)))}mF(WJ,"cut");mF(jJ,"copy");qS&&(qS.addImplementation(1e4,"code-editor",(i,e)=>{let t=i.get(_t),n=i.get(qs),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&rf?(()=>BJ(void 0,void 0,void 0,function*(){let s=yield n.readText();if(s!==""){let a=mk.INSTANCE.get(s),l=!1,c=null,d=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),qS.addImplementation(0,"generic-dom",(i,e)=>(document.execCommand("paste"),!0)));uF&&F(GS);Me();Bt();Me();ht();Dt();Gt();it();re();wn();Ie();Mi();ut();Ya();g1();be();Ci();mc();Qa();it();var VJ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ee=class i{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+i.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new i(this.value+i.sep+e)}};Ee.sep=".";Ee.None=new Ee("@@none@@");Ee.Empty=new Ee("");Ee.QuickFix=new Ee("quickfix");Ee.Refactor=new Ee("refactor");Ee.RefactorExtract=Ee.Refactor.append("extract");Ee.RefactorInline=Ee.Refactor.append("inline");Ee.RefactorMove=Ee.Refactor.append("move");Ee.RefactorRewrite=Ee.Refactor.append("rewrite");Ee.Source=new Ee("source");Ee.SourceOrganizeImports=Ee.Source.append("organizeImports");Ee.SourceFixAll=Ee.Source.append("fixAll");Ee.SurroundWith=Ee.Refactor.append("surround");var Xi;(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(Xi||(Xi={}));function pF(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>gF(e,t,i.include))||!i.includeSourceActions&&Ee.Source.contains(e))}function fF(i,e){let t=e.kind?new Ee(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>gF(t,n,i.include))||!i.includeSourceActions&&t&&Ee.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function gF(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}var Tl=class i{static fromUser(e,t){return!e||typeof e!="object"?new i(t.kind,t.apply,!1):new i(i.getKindFromUser(e,t.kind),i.getApplyFromUser(e,t.apply),i.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ee(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}},Tv=class{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return VJ(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(r){bt(r)}n&&(this.action.edit=n.edit)}return this})}};var Iv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},kv="editor.action.codeAction",Wh="editor.action.quickFix",Av="editor.action.autoFix",Lv="editor.action.refactor",Nv="editor.action.sourceAction",x0="editor.action.organizeImports",E0="editor.action.fixAll",YS=class i extends Y{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Xt(e.diagnostics)?Xt(t.diagnostics)?i.codeActionsPreferredComparator(e,t):-1:Xt(t.diagnostics)?1:i.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(i.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ee.QuickFix.contains(new Ee(e.kind))&&!!e.isPreferred)}},_F={actions:[],documentation:void 0};function T0(i,e,t,n,r,o){var s;return Iv(this,void 0,void 0,function*(){let a=n.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:n.type},c=new _k(e,o),d=KJ(i,e,a),h=new W,u=d.map(p=>Iv(this,void 0,void 0,function*(){try{r.report(p);let f=yield p.provideCodeActions(e,t,l,c.token);if(f&&h.add(f),c.token.isCancellationRequested)return _F;let _=((f==null?void 0:f.actions)||[]).filter(C=>C&&fF(a,C)),b=GJ(p,_,a.include);return{actions:_.map(C=>new Tv(C,p)),documentation:b}}catch(f){if(Wr(f))throw f;return bt(f),_F}})),m=i.onDidChange(()=>{let p=i.all(e);Uo(p,d)||c.cancel()});try{let p=yield Promise.all(u),f=p.map(b=>b.actions).flat(),_=[...Wo(p.map(b=>b.documentation)),...qJ(i,e,n,f)];return new YS(f,_,h)}finally{m.dispose(),c.dispose()}})}function KJ(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(r=>pF(t,new Ee(r))):!0)}function*qJ(i,e,t,n){var r,o,s;if(e&&n.length)for(let a of i.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},n.map(l=>l.action)))}function GJ(i,e,t){if(!i.documentation)return;let n=i.documentation.map(r=>({kind:new Ee(r.kind),command:r.command}));if(t){let r;for(let o of n)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(let r of e)if(r.kind){for(let o of n)if(o.kind.contains(new Ee(r.kind)))return o.command}}var w0;(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions"})(w0||(w0={}));function vF(i,e,t,n,r=ze.None){var o;return Iv(this,void 0,void 0,function*(){let s=i.get(Wf),a=i.get(Pt),l=i.get(Tn),c=i.get(ri);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==w0.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(d){let h=$J(d);c.error(typeof h=="string"?h:g("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function $J(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}Je.registerCommand("_executeCodeActionProvider",function(i,e,t,n,r){return Iv(this,void 0,void 0,function*(){if(!(e instanceof Qe))throw Jl();let{codeActionProvider:o}=i.get(le),s=i.get(Ri).getModel(e);if(!s)throw Jl();let a=ye.isISelection(t)?ye.liftSelection(t):k.isIRange(t)?s.validateRange(t):void 0;if(!a)throw Jl();let l=typeof n=="string"?new Ee(n):void 0,c=yield T0(o,s,a,{type:1,triggerAction:Xi.Default,filter:{includeSourceActions:!0,include:l}},Qo.None,ze.None),d=[],h=Math.min(c.validActions.length,typeof r=="number"?r:0);for(let u=0;u u.action)}finally{setTimeout(()=>c.dispose(),100)}})});be();qe();gt();it();O2();re();St();ut();O2();un();var YJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},XJ=function(i,e){return function(t,n){e(t,n,i)}},I0=class bF{constructor(e){this.keybindingService=e}getResolver(){let e=new Ud(()=>this.keybindingService.getKeybindings().filter(t=>bF.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===x0?n={kind:Ee.SourceOrganizeImports.value}:t.command===E0&&(n={kind:Ee.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Tl.fromUser(n,{kind:Ee.None,apply:"never"}))}));return t=>{if(t.kind){let n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;let n=new Ee(e.kind);return t.filter(r=>r.kind.contains(n)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};I0.codeActionCommands=[Lv,kv,Nv,x0,E0];I0=YJ([XJ(0,mt)],I0);sn();be();An();var m_e=pe("symbolIcon.arrayForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p_e=pe("symbolIcon.booleanForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f_e=pe("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g_e=pe("symbolIcon.colorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),__e=pe("symbolIcon.constantForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v_e=pe("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b_e=pe("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y_e=pe("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S_e=pe("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C_e=pe("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w_e=pe("symbolIcon.fileForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x_e=pe("symbolIcon.folderForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E_e=pe("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T_e=pe("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I_e=pe("symbolIcon.keyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k_e=pe("symbolIcon.keywordForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A_e=pe("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L_e=pe("symbolIcon.moduleForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N_e=pe("symbolIcon.namespaceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D_e=pe("symbolIcon.nullForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R_e=pe("symbolIcon.numberForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M_e=pe("symbolIcon.objectForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O_e=pe("symbolIcon.operatorForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P_e=pe("symbolIcon.packageForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F_e=pe("symbolIcon.propertyForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),H_e=pe("symbolIcon.referenceForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B_e=pe("symbolIcon.snippetForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z_e=pe("symbolIcon.stringForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),U_e=pe("symbolIcon.structForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),W_e=pe("symbolIcon.textForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),j_e=pe("symbolIcon.typeParameterForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),V_e=pe("symbolIcon.unitForeground",{dark:de,light:de,hcDark:de,hcLight:de},g("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),K_e=pe("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));be();var yF=Object.freeze({kind:Ee.Empty,title:g("codeAction.widget.id.more","More Actions...")}),QJ=Object.freeze([{kind:Ee.QuickFix,title:g("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Ee.RefactorExtract,title:g("codeAction.widget.id.extract","Extract..."),icon:Re.wrench},{kind:Ee.RefactorInline,title:g("codeAction.widget.id.inline","Inline..."),icon:Re.wrench},{kind:Ee.RefactorRewrite,title:g("codeAction.widget.id.convert","Rewrite..."),icon:Re.wrench},{kind:Ee.RefactorMove,title:g("codeAction.widget.id.move","Move..."),icon:Re.wrench},{kind:Ee.SurroundWith,title:g("codeAction.widget.id.surround","Surround With..."),icon:Re.symbolSnippet},{kind:Ee.Source,title:g("codeAction.widget.id.source","Source Action..."),icon:Re.symbolFile},yF]);function SF(i,e,t){if(!e)return i.map(o=>({kind:"action",item:o,group:yF,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));let n=QJ.map(o=>({group:o,actions:[]}));for(let o of i){let s=o.action.kind?new Ee(o.action.kind):Ee.None;for(let a of n)if(a.group.kind.contains(s)){a.actions.push(o);break}}let r=[];for(let o of n)if(o.actions.length){r.push({kind:"header",group:o.group});for(let s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}gt();bk();sn();wt();re();er();ii();ik();be();un();var JJ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ZJ=function(i,e){return function(t,n){e(t,n,i)}},jh;(function(i){i.Hidden={type:0};class e{constructor(n,r,o,s){this.actions=n,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}i.Showing=e})(jh||(jh={}));var wa=class CF extends Y{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new De),this.onClick=this._onClick.event,this._state=jh.Hidden,this._domNode=te("div.lightBulbWidget"),this._register(Vf.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{let r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(bT(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();let{top:r,height:o}=xn(this._domNode),s=this._editor.getOption(64),a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber {(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Nt.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,r;this._preferredKbLabel=ji((n=t.lookupKeybinding(Av))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=ji((r=t.lookupKeybinding(Wh))===null||r===void 0?void 0:r.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();let r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();let o=this._editor.getModel();if(!o)return this.hide();let{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(48),d=o.getLineContent(s),h=h1(d,l),u=c.spaceWidth*h>22,m=f=>f>2&&this._editor.getTopForLineNumber(f)===this._editor.getTopForLineNumber(f-1),p=s;if(!u){if(s>1&&!m(s-1))p-=1;else if(!m(s+1))p+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new jh.Showing(e,t,n,{position:{lineNumber:p,column:1},preference:CF._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==jh.Hidden&&(this.state=jh.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...je.asClassNameArray(Re.lightBulb)),this._domNode.classList.add(...je.asClassNameArray(Re.lightbulbAutofix)),this._preferredKbLabel)){this.title=g("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...je.asClassNameArray(Re.lightbulbAutofix)),this._domNode.classList.add(...je.asClassNameArray(Re.lightBulb)),this._quickFixKbLabel?this.title=g("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=g("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};wa.ID="editor.contrib.lightbulbWidget";wa._posPref=[0];wa=JJ([ZJ(1,mt)],wa);wr();ct();re();Me();Ie();be();qe();var eZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tZ=function(i,e){return function(t,n){e(t,n,i)}},Qi=class XS{static get(e){return e.getContribution(XS.ID)}constructor(e,t){this._messageWidget=new li,this._messageListeners=new W,this._editor=e,this._visible=XS.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Kt(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Dv(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new jo(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(r=>{r.target.position&&(n?n.containsPosition(r.target.position)||this.closeMessage():n=new k(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Dv.fadeOut(this._messageWidget.value))}};Qi.ID="editor.contrib.messageController";Qi.MESSAGE_VISIBLE=new Ne("messageVisible",!1,g("messageVisible","Whether the editor is currently showing an inline message"));Qi=eZ([tZ(1,we)],Qi);var iZ=ni.bindToContribution(Qi.get);ge(new iZ({id:"leaveEditorMessage",precondition:Qi.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:100+30,primary:9}}));var Dv=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);let s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Se(Qi.ID,Qi,4);be();gt();re();be();gt();sn();re();Sn();er();be();un();An();var wF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},QS=function(i,e){return function(t,n){e(t,n,i)}},tC="acceptSelectedCodeAction",iC="previewSelectedCodeAction",JS=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var r,o;n.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}},ZS=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let n=document.createElement("span");n.className="title",e.append(n);let r=new Gf(e,of);return{container:e,icon:t,text:n,keybinding:r}}renderElement(e,t,n){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(n.icon.className=je.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Ko(e.group.icon.color.id))):(n.icon.className=je.asClassName(Re.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=xF(e.label),n.keybinding.set(e.keybinding),ET(!!e.keybinding,n.keybinding.element);let a=(o=this._keybindingService.lookupKeybinding(tC))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(iC))===null||s===void 0?void 0:s.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:a&&l?this._supportsPreview?n.container.title=g({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):n.container.title=g({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):n.container.title=""}disposeTemplate(e){}};ZS=wF([QS(1,mt)],ZS);var eC=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Rv=class extends UIEvent{constructor(){super("previewSelectedAction")}},Mv=class extends Y{constructor(e,t,n,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");let a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new qf(e,this.domNode,a,[new ZS(t,this._keybindingService),new JS],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let c=l.label?xF(l==null?void 0:l.label):"";return l.disabled&&(c=g({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",c,l.disabled)),c}return null},getWidgetAriaLabel:()=>g({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Ik),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){let t=this._allMenuItems.filter(c=>c.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);let o=this._allMenuItems.map((c,d)=>{let h=document.getElementById(this._list.getElementID(d));if(h){h.style.width="auto";let u=h.getBoundingClientRect().width;return h.style.width="",u}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let n=t[0],r=this._list.element(n);if(!this.focusCondition(r))return;let o=e?new Rv:new eC;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Rv):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Mv=wF([QS(4,ol),QS(5,mt)],Mv);function xF(i){return i.replace(/\r\n|\r|\n/g," ")}mi();qe();ac();st();var nZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nC=function(i,e){return function(t,n){e(t,n,i)}},Bc={Visible:new Ne("codeActionMenuVisible",!1,g("codeActionMenuVisible","Whether the action widget list is visible"))},Il=Zn("actionWidgetService"),zc=class extends Y{get isVisible(){return Bc.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new li)}show(e,t,n,r,o,s,a){let l=Bc.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Mv,e,t,n,r);this._contextViewService.showContextView({getAnchor:()=>o,render:d=>(l.set(!0),this._renderWidget(d,c,a!=null?a:[])),onHide:d=>{l.reset(),this._onWidgetClosed(d)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var r;let o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");let s=new W,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(jt(l,Jn.MOUSE_DOWN,p=>p.stopPropagation()));let c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),s.add(jt(d,Jn.POINTER_MOVE,()=>d.remove())),s.add(jt(d,Jn.MOUSE_DOWN,()=>d.remove()));let h=0;if(n.length){let p=this._createActionBar(".action-widget-action-bar",n);p&&(o.appendChild(p.getContainer().parentElement),s.add(p),h=p.getContainer().offsetWidth)}let u=(r=this._list.value)===null||r===void 0?void 0:r.layout(h);o.style.width=`${u}px`;let m=s.add(zs(e));return s.add(m.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;let n=te(e),r=new kr(n);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};zc=nZ([nC(0,ol),nC(1,we),nC(2,Ce)],zc);ir(Il,zc,1);var k0=100+1e3;Ft(class extends Gr{constructor(){super({id:"hideCodeActionWidget",title:{value:g("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:Bc.Visible,keybinding:{weight:k0,primary:9,secondary:[1033]}})}run(i){i.get(Il).hide()}});Ft(class extends Gr{constructor(){super({id:"selectPrevCodeAction",title:{value:g("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusPrevious()}});Ft(class extends Gr{constructor(){super({id:"selectNextCodeAction",title:{value:g("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){let e=i.get(Il);e instanceof zc&&e.focusNext()}});Ft(class extends Gr{constructor(){super({id:tC,title:{value:g("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:3,secondary:[2137]}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected()}});Ft(class extends Gr{constructor(){super({id:iC,title:{value:g("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:Bc.Visible,keybinding:{weight:k0,primary:2051}})}run(i){let e=i.get(Il);e instanceof zc&&e.acceptSelected(!0)}});Ci();an();qe();st();mc();ct();it();wt();re();Tr();qe();mc();var rC=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},rZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},Vh,sC=new Ne("supportedCodeAction",""),oC=class extends Y{constructor(e,t,n,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=r,this._autoTriggerTimer=this._register(new jo),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){let t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){let t=this._editor.getModel();t&&e.some(n=>qd(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Xi.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){let{lineNumber:r,column:o}=n.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return n}},Uc;(function(i){i.Empty={type:0};class e{constructor(n,r,o){this.trigger=n,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(Wr(s))return oZ;throw s})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(Uc||(Uc={}));var oZ=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1}),Ov=class extends Y{constructor(e,t,n,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new li),this._state=Uc.Empty,this._onDidChangeState=this._register(new De),this.onDidChangeState=this._onDidChangeState.event,Vh.set(this,!1),this._supportedCodeActions=sC.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){rC(this,Vh,"f")||(rZ(this,Vh,!0,"f"),super.dispose(),this.setState(Uc.Empty,!0))}_update(){if(rC(this,Vh,"f"))return;this._codeActionOracle.value=void 0,this.setState(Uc.Empty);let e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){let t=this._registry.all(e).flatMap(n=>{var r;return(r=n.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new oC(this._editor,this._markerService,n=>{var r;if(!n){this.setState(Uc.Empty);return}let o=Ht(s=>T0(this._registry,e,n.selection,n.trigger,Qo.None,s));n.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new Uc.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Xi.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!rC(this,Vh,"f")&&this._onDidChangeState.fire(e))}};Vh=new WeakMap;var sZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xa=function(i,e){return function(t,n){e(t,n,i)}},Pv=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},aZ=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},lZ=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},Fv,ys=class EF extends Y{static get(e){return e.getContribution(EF.ID)}constructor(e,t,n,r,o,s,a,l,c,d){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=d,this._activeCodeActions=this._register(new li),this._showDisabled=!1,Fv.set(this,!1),this._editor=e,this._model=this._register(new Ov(this._editor,o.codeActionProvider,t,n,s)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Ud(()=>{let h=this._editor.getContribution(wa.ID);return h&&this._register(h.onClick(u=>this.showCodeActionList(u.actions,u,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=r.createInstance(I0),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){aZ(this,Fv,!0,"f"),super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,r){var o;if(!this._editor.hasModel())return;(o=Qi.get(this._editor))===null||o===void 0||o.closeMessage();let s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return Pv(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(vF,e,w0.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Xi.QuickFix,filter:{}})}})}update(e){var t,n,r,o,s,a,l;return Pv(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let c;try{c=yield e.actions}catch(d){Be(d);return}if(!lZ(this,Fv,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(c,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){let h=this.tryGetValidActionToApply(e.trigger,c);if(h){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(h,!1,!1)}finally{c.dispose()}return}if(e.trigger.context){let u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,c);if(u&&u.action.disabled){(s=Qi.get(this._editor))===null||s===void 0||s.showMessage(u.action.disabled,e.trigger.context.position),c.dispose();return}}}let d=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!c.allActions.length||!d&&!c.validActions.length)){(l=Qi.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=c,c.dispose();return}this._activeCodeActions.value=c,this.showCodeActionList(c,this.toCoords(e.position),{includeDisabledActions:d,fromLightbulb:!1})}else this._actionWidgetService.isVisible?c.dispose():this._activeCodeActions.value=c})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return Pv(this,void 0,void 0,function*(){let r=this._editor.getDomNode();if(!r)return;let o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;let s=ie.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,c)=>Pv(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,SF(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();let t=this._editor.getScrolledVisiblePosition(e),n=xn(this._editor.getDomNode()),r=n.left+t.left,o=n.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;let t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];let r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:g("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:g("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),r}};Fv=new WeakMap;ys.ID="editor.contrib.codeActionController";ys=sZ([xa(1,v1),xa(2,we),xa(3,Ce),xa(4,le),xa(5,Gs),xa(6,Pt),xa(7,nt),xa(8,Il),xa(9,Ce)],ys);function A0(i){return $.regex(sC.keys()[0],new RegExp("(\\s|^)"+Ws(i.value)+"\\b"))}var aC={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:g("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:g("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[g("args.schema.apply.first","Always apply the first returned code action."),g("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),g("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:g("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function Wc(i,e,t,n,r=Xi.Default){if(i.hasModel()){let o=ys.get(i);o==null||o.manualTriggerAtCurrentPosition(e,r,t,n)}}var Hv=class extends K{constructor(){super({id:Wh,label:g("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:$.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:2137,weight:100}})}run(e,t){return Wc(t,g("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Xi.QuickFix)}},Bv=class extends ni{constructor(){super({id:kv,precondition:$.and(I.writable,I.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:aC}]}})}runEditorCommand(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Empty,apply:"ifSingle"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):g("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?g("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):g("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}},zv=class extends K{constructor(){super({id:Lv,label:g("refactor.label","Refactor..."),alias:"Refactor...",precondition:$.and(I.writable,I.hasCodeActionsProvider),kbOpts:{kbExpr:I.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:$.and(I.writable,A0(Ee.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Refactor,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):g("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?g("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):g("editor.action.refactor.noneMessage","No refactorings available"),{include:Ee.Refactor.contains(r.kind)?r.kind:Ee.None,onlyIncludePreferredActions:r.preferred},r.apply,Xi.Refactor)}},Uv=class extends K{constructor(){super({id:Nv,label:g("source.label","Source Action..."),alias:"Source Action...",precondition:$.and(I.writable,I.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:$.and(I.writable,A0(Ee.Source))},description:{description:"Source Action...",args:[{name:"args",schema:aC}]}})}run(e,t,n){let r=Tl.fromUser(n,{kind:Ee.Source,apply:"never"});return Wc(t,typeof(n==null?void 0:n.kind)=="string"?r.preferred?g("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):g("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?g("editor.action.source.noneMessage.preferred","No preferred source actions available"):g("editor.action.source.noneMessage","No source actions available"),{include:Ee.Source.contains(r.kind)?r.kind:Ee.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Xi.SourceAction)}},Wv=class extends K{constructor(){super({id:x0,label:g("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:$.and(I.writable,A0(Ee.SourceOrganizeImports)),kbOpts:{kbExpr:I.textInputFocus,primary:1581,weight:100}})}run(e,t){return Wc(t,g("editor.action.organize.noneMessage","No organize imports action available"),{include:Ee.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Xi.OrganizeImports)}},jv=class extends K{constructor(){super({id:E0,label:g("fixAll.label","Fix All"),alias:"Fix All",precondition:$.and(I.writable,A0(Ee.SourceFixAll))})}run(e,t){return Wc(t,g("fixAll.noneMessage","No fix all action available"),{include:Ee.SourceFixAll,includeSourceActions:!0},"ifSingle",Xi.FixAll)}},Vv=class extends K{constructor(){super({id:Av,label:g("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:$.and(I.writable,A0(Ee.QuickFix)),kbOpts:{kbExpr:I.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Wc(t,g("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ee.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Xi.AutoFix)}};be();tI();rc();Se(ys.ID,ys,3);Se(wa.ID,wa,4);F(Hv);F(zv);F(Uv);F(Wv);F(Vv);F(jv);ge(new Bv);tr.as(Cf.Configuration).registerConfiguration(Object.assign(Object.assign({},gk),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:g("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));Bs();Me();Ie();ht();ln();Zo();St();Ie();Mi();var Ea=class i{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;let r=t.length,o=e.length;if(n+r>o)return!1;for(let s=0;s =65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,r,o,s){let a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,h=o.getLineContent(a),u=o.getLineContent(c),m=h.lastIndexOf(t,l-1+t.length),p=u.indexOf(n,d-1-n.length);if(m!==-1&&p!==-1)if(a===c)h.substring(m+t.length,p).indexOf(n)>=0&&(m=-1,p=-1);else{let _=h.substring(m+t.length),b=u.substring(0,p);(_.indexOf(n)>=0||b.indexOf(n)>=0)&&(m=-1,p=-1)}let f;m!==-1&&p!==-1?(r&&m+t.length 0&&u.charCodeAt(p-1)===32&&(n=" "+n,p-=1),f=i._createRemoveBlockCommentOperations(new k(a,m+t.length+1,c,p+1),t,n)):(f=i._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=f.length===1?n:null);for(let _ of f)s.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,n){let r=[];return k.isEmpty(e)?r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(at.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(at.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}static _createAddBlockCommentOperations(e,t,n,r){let o=[];return k.isEmpty(e)?o.push(at.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(o.push(at.insert(new ie(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(at.insert(new ie(e.endLineNumber,e.endColumn),(r?" ":"")+n))),o}getEditOperations(e,t){let n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);let o=e.getLanguageIdAtPosition(n,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){let n=t.getInverseEditOperations();if(n.length===2){let r=n[0],o=n[1];return new ye(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{let r=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new ye(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}};Bt();Zo();St();Ie();Mi();var Kv=class i{constructor(e,t,n,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,r){e.tokenization.tokenizeIfCheap(t);let o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;let l=[];for(let c=0,d=n-t+1;c o?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}};be();mi();var L0=class extends K{constructor(e,t){super(t),this._type=e}run(e,t){let n=e.get(rt);if(!t.hasModel())return;let r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>k.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d =0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},jc=function(i,e){return function(t,n){e(t,n,i)}},Kh=class TF{static get(e){return e.getContribution(TF.ID)}constructor(e,t,n,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new W,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){let d=this._contextViewService.getContextViewElement(),h=c.srcElement;h.shadowRoot&&wT(d)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(22)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(let r of this._editor.getSelections())if(r.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;let t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?ae.SimpleEditorContext:ae.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){let n=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(let s of o){let[,a]=s,l=0;for(let c of a)if(c instanceof Qu){let d=this._getMenuActions(e,c.item.submenu);d.length>0&&(n.push(new Yu(c.id,c.label,d)),l++)}else n.push(c),l++;l&&n.push(new fo)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();let o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),s=xn(this._editor.getDomNode()),a=s.left+o.left,l=s.top+o.top+o.height;t={x:a,y:l}}let r=this._editor.getOption(123)&&!A2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{let s=this._keybindingFor(o);if(s)return new i9(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});let a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new i9(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Dk(this._workspaceContextService.getWorkspace()))return;let t=this._editor.getOption(70),n=0,r=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled=="undefined"?!0:c.enabled,checked:c.checked,run:c.run}),o=(c,d)=>new Yu(`menu-action-${++n}`,c,d,void 0),s=(c,d,h,u,m)=>{if(!d)return r({label:c,enabled:d,run:()=>{}});let p=_=>()=>{this._configurationService.updateValue(h,_)},f=[];for(let _ of m)f.push(r({label:_.label,checked:u===_.value,run:p(_.value)}));return o(c,f)},a=[];a.push(r({label:g("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new fo),a.push(r({label:g("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(g("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:g("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:g("context.minimap.size.fill","Fill"),value:"fill"},{label:g("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(g("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:g("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:g("context.minimap.slider.always","Always"),value:"always"}]));let l=this._editor.getOption(123)&&!A2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Kh.ID="editor.contrib.contextmenu";Kh=cZ([jc(1,Jo),jc(2,ol),jc(3,we),jc(4,mt),jc(5,go),jc(6,nt),jc(7,b1)],Kh);var uC=class extends K{constructor(){super({id:"editor.action.showContextMenu",label:g("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Kh.get(t))===null||n===void 0||n.showContextMenu()}};Se(Kh.ID,Kh,2);F(uC);re();Me();ht();be();var N0=class{constructor(e){this.selections=e}equals(e){let t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let r=0;r {this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;let n=new N0(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new D0(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new D0(new N0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new D0(new N0(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};Vc.ID="editor.contrib.cursorUndoRedoController";var mC=class extends K{constructor(){super({id:"cursorUndo",label:g("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:I.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var r;(r=Vc.get(t))===null||r===void 0||r.cursorUndo()}},pC=class extends K{constructor(){super({id:"cursorRedo",label:g("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var r;(r=Vc.get(t))===null||r===void 0||r.cursorRedo()}};Se(Vc.ID,Vc,0);F(mC);F(pC);re();Sn();Me();St();Ie();Mi();hn();Ie();Mi();var qv=class{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){let n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new ye(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new ye(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(33)||this._editor.getOption(20)||(qh(e)&&(this._modifierPressed=!0),this._mouseDown&&qh(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(qh(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===i.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(this._dragSelection===null){let r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}qh(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new ie(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){let r=this._editor.getSelection();if(r){let{selectionStartLineNumber:o,selectionStartColumn:s}=r;n=[new ye(o,s,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new ye(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(qh(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(i.ID,new qv(this._dragSelection,t,qh(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:i._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};Kc.ID="editor.contrib.dragAndDrop";Kc.TRIGGER_KEY_VALUE=Wi?6:5;Kc._DECORATION_OPTIONS=Ue.register({description:"dnd-target",className:"dnd-target"});Se(Kc.ID,Kc,2);ct();re();Bt();Me();tk();ht();rl();Dt();ct();re();St();Ie();Mi();nj();Ie();rl();hn();An();cn();var Ss=class i{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){let e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){let t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){let t=e {if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,i._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,i._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){let s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new k(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,i._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let r=i._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){r=i._FIND_MATCH_NO_OVERVIEW_DECORATION;let a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c)),h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let m=1,p=e.length;m =f.startLineNumber?f.endLineNumber>u&&(u=f.endLineNumber):(o.push({range:new k(h,1,u,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=f.startLineNumber,u=f.endLineNumber)}o.push({range:new k(h,1,u,1),options:i._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let s=new Array(e.length);for(let a=0,l=e.length;a
n.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,i._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumber e.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;t e.lineNumber)return o;if(!(o.startColumn 0){let n=[];for(let s=0;s k.compareRangesUsingStarts(s.range,a.range));let r=[],o=n[0];for(let s=1;s 0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function IF(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function kF(i,e,t){let n=e.split(t),r=i[0].split(t),o="";return n.forEach((s,a)=>{o+=fC([r[a]],s)+t}),o.slice(0,-1)}var $v=class{constructor(e){this.staticValue=e,this.kind=0}},gC=class{constructor(e){this.pieces=e,this.kind=1}},$h=class i{static fromStaticValue(e){return new i([Gh.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new $v(""):e.length===1&&e[0].staticValue!==null?this._state=new $v(e[0].staticValue):this._state=new gC(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?fC(e,this._state.staticValue):this._state.staticValue;let n="";for(let r=0,o=this._state.pieces.length;r 0){let l=[],c=s.caseOps.length,d=0;for(let h=0,u=a.length;h=c){l.push(a.slice(h));break}switch(s.caseOps[d]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),d++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),d++;break;default:l.push(a[h])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e =r)break;let s=i.charCodeAt(n);switch(s){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` -`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1 this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ti(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},dZ)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Cs);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=bf(r.map(l=>l.range),l=>k.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new ie(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount() =0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new ie(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount() i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Cs?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new nk(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let h="mu";n.ignoreCase&&(h+="i"),n.global&&(h+="g"),n=new RegExp(n.source,h)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new _f(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;ss.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new ye(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:Ko(Rf),inputActiveOptionForeground:Ko(Of),inputActiveOptionBackground:Ko(Mf)};this.caseSensitive=this._register(new Rk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new Mk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Ok(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(jt(this._domNode,Jn.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(jt(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};B0.ID="editor.contrib.findOptionsWidget";wt();re();Ie();function Xv(i,e){return i===1?!0:i===2?!1:e}var Qv=class extends Y{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Xv(this._isRegexOverride,this._isRegex)}get wholeWord(){return Xv(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Xv(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Xv(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new De),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(k.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(h=>{var u;return(u=this._searchScope)===null||u===void 0?void 0:u.some(m=>!k.equalsRange(m,h))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Cs}};gt();wr();Kf();ct();sn();it();re();Sn();Bt();Ie();be();gt();Kf();sn();wt();be();var hZ=g("defaultLabel","input"),uZ=g("label.preserveCaseToggle","Preserve Case"),vC=class extends $f{constructor(e){super({icon:Re.preserveCase,title:uZ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},Jv=class extends $s{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new De),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new De),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new De),this._onInput=this._register(new De),this._onKeyUp=this._register(new De),this._onPreserveCaseKeyDown=this._register(new De),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||hZ;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Pk(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new vC(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(u=>{this._onPreserveCaseKeyDown.fire(u)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){let m=d.indexOf(document.activeElement);if(m>=0){let p=-1;u.equals(17)?p=(m+1)%d.length:u.equals(15)&&(m===0?p=d.length-1:p=m-1),u.equals(9)?(d[m].blur(),this.inputBox.focus()):p>=0&&d[p].focus(),tc.stop(u,!0)}}});let h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}};qe();z2();be();re();var LF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NF=function(i,e){return function(t,n){e(t,n,i)}},i4=new Ne("suggestWidgetVisible",!1,g("suggestWidgetVisible","Whether suggestion are visible")),bC="historyNavigationWidgetFocus",DF="historyNavigationForwardsEnabled",RF="historyNavigationBackwardsEnabled",Ta,Zv=[];function MF(i,e){if(Zv.includes(e))throw new Error("Cannot register the same widget multiple times");Zv.push(e);let t=new W,n=new Ne(bC,!1).bindTo(i),r=new Ne(DF,!0).bindTo(i),o=new Ne(RF,!0).bindTo(i),s=()=>{n.set(!0),Ta=e},a=()=>{n.set(!1),Ta===e&&(Ta=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ft(()=>{Zv.splice(Zv.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var e4=class extends Fk{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(MF(o,this.inputBox))}};e4=LF([NF(3,we)],e4);var t4=class extends Jv{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(MF(s,this.inputBox))}};t4=LF([NF(3,we)],t4);Er.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:G.and(G.has(bC),G.equals(RF,!0),i4.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Ta==null||Ta.showPreviousValue()}});Er.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:G.and(G.has(bC),G.equals(DF,!0),i4.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Ta==null||Ta.showNextValue()}});function yC(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}An();cn();er();ek();ii();var mZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},pZ=Qt("find-selection",Re.selection,g("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),OF=Qt("find-collapsed",Re.chevronRight,g("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),PF=Qt("find-expanded",Re.chevronDown,g("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),fZ=Qt("find-replace",Re.replace,g("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),gZ=Qt("find-replace-all",Re.replaceAll,g("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),_Z=Qt("find-previous-match",Re.arrowUp,g("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),vZ=Qt("find-next-match",Re.arrowDown,g("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),bZ=g("label.find","Find"),yZ=g("placeholder.find","Find"),SZ=g("label.previousMatchButton","Previous Match"),CZ=g("label.nextMatchButton","Next Match"),wZ=g("label.toggleSelectionFind","Find in Selection"),xZ=g("label.closeButton","Close"),EZ=g("label.replace","Replace"),TZ=g("placeholder.replace","Replace"),IZ=g("label.replaceButton","Replace"),kZ=g("label.replaceAllButton","Replace All"),AZ=g("label.toggleReplaceButton","Toggle Replace"),LZ=g("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Cs),NZ=g("label.matchesLocation","{0} of {1}"),FF=g("label.noResults","No results"),xs=419,DZ=275,RZ=DZ-54,z0=69,MZ=33,HF="ctrlEnterReplaceAll.windows.donotask",BF=Wi?256:2048,U0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=MZ,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};function zF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function UF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(140)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(39)){let h=this._codeEditor.getOption(39).loop;this._state.change({loop:h},!1);let u=this._codeEditor.getOption(39).addExtraSpaceOnTop;u&&!this._viewZone&&(this._viewZone=new U0(0),this._showViewZone()),!u&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>mZ(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=Yh.bindTo(s),this._findFocusTracker=this._register(zs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=R0.bindTo(s),this._replaceFocusTracker=this._register(zs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(39).addExtraSpaceOnTop&&(this._viewZone=new U0(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Bo(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Be)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=z0+"px",this._state.matchesCount>=Cs?this._matchesCount.title=LZ:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Cs&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=xr(NZ,n,t)}else e=FF;this._matchesCount.appendChild(document.createTextNode(e)),Kt(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),z0=Math.max(z0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===FF)return n===""?g("ariaSearchNoResultEmpty","{0} found",e):g("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=g("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return g("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=xn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a e.startLineNumber&&(t=!1);let l=ST(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new U0(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(81).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!vT(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&Bo(this._domNode)>xs){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=Bo(this._findInput.domNode);return}if(xs+28+r>=n&&(s=!0),xs+28+r-z0>=n&&(a=!0),xs+28+r-z0>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(BF|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(s));break}continue}if(o===36){if(n++,n>=r)break;let s=i.charCodeAt(n);if(s===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(s===48||s===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=s&&s<=57){let a=s-48;if(n+1 this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ti(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},dZ)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let r=this._findMatches(n,!1,Cs);this._decorations.set(r,n);let o=this._editor.getSelection(),s=this._decorations.getCurrentMatchesPosition(o);if(s===0&&r.length>0){let a=bf(r.map(l=>l.range),l=>k.compareRangesUsingStarts(l,o)>=0);s=a>0?a-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(39).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===1?(n===1?n=o.getLineCount():n--,r=o.getLineMaxColumn(n)):r--,new ie(n,r)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){let d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount() =0||this._state.searchString.indexOf("$")>=0),{lineNumber:n,column:r}=e,o=this._editor.getModel();return t||r===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,r=1):r++,new ie(n,r)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){let n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount() i._getSearchRange(this._editor.getModel(),o));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null,t,n)}replaceAll(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Cs?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){let t=new nk(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(126):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let h="mu";n.ignoreCase&&(h+="i"),n.global&&(h+="g"),n=new RegExp(n.source,h)}let r=this._editor.getModel(),o=r.getValue(1),s=r.getFullModelRange(),a=this._getReplacePattern(),l,c=this._state.preserveCase;a.hasReplacementPatterns||c?l=o.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=o.replace(n,a.buildReplaceString(null,c));let d=new _f(s,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){let t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,a=n.length;ss.range),r);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),n=this._findMatches(e,!1,1073741824).map(o=>new ye(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn)),r=this._editor.getSelection();for(let o=0,s=n.length;o this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");let r={inputActiveOptionBorder:Ko(Rf),inputActiveOptionForeground:Ko(Of),inputActiveOptionBackground:Ko(Mf)};this.caseSensitive=this._register(new Rk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},r))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new Mk(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleWholeWordCommand),isChecked:this._state.wholeWord},r))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Ok(Object.assign({appendTitle:this._keybindingLabelFor(dt.ToggleRegexCommand),isChecked:this._state.isRegex},r))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let s=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,s=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,s=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,s=!0),!this._state.isRevealed&&s&&this._revealTemporarily()})),this._register(jt(this._domNode,Jn.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(jt(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};B0.ID="editor.contrib.findOptionsWidget";wt();re();Ie();function Xv(i,e){return i===1?!0:i===2?!1:e}var Qv=class extends Y{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Xv(this._isRegexOverride,this._isRegex)}get wholeWord(){return Xv(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Xv(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Xv(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new De),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){let r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,o=!0),typeof n!="undefined"&&(k.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(r)}change(e,t,n=!0){var r;let o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},s=!1,a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((r=e.searchScope)===null||r===void 0)&&r.every(h=>{var u;return(u=this._searchScope)===null||u===void 0?void 0:u.some(m=>!k.equalsRange(m,h))})||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),typeof e.isSearching!="undefined"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),typeof e.filters!="undefined"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(s=!0,o.isRegex=!0),l!==this.wholeWord&&(s=!0,o.wholeWord=!0),c!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=Cs}};gt();wr();Kf();ct();sn();it();re();Sn();Bt();Ie();be();gt();Kf();sn();wt();be();var hZ=g("defaultLabel","input"),uZ=g("label.preserveCaseToggle","Preserve Case"),vC=class extends $f{constructor(e){super({icon:Re.preserveCase,title:uZ+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}},Jv=class extends $s{constructor(e,t,n,r){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new De),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new De),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new De),this._onInput=this._register(new De),this._onKeyUp=this._register(new De),this._onPreserveCaseKeyDown=this._register(new De),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||hZ;let o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,c=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Pk(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new vC(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(u=>{this._onDidOptionChange.fire(u),!u&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(u=>{this._onPreserveCaseKeyDown.fire(u)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,u=>{if(u.equals(15)||u.equals(17)||u.equals(9)){let m=d.indexOf(document.activeElement);if(m>=0){let p=-1;u.equals(17)?p=(m+1)%d.length:u.equals(15)&&(m===0?p=d.length-1:p=m-1),u.equals(9)?(d[m].blur(),this.inputBox.focus()):p>=0&&d[p].focus(),tc.stop(u,!0)}}});let h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}};qe();z2();be();re();var LF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NF=function(i,e){return function(t,n){e(t,n,i)}},i4=new Ne("suggestWidgetVisible",!1,g("suggestWidgetVisible","Whether suggestion are visible")),bC="historyNavigationWidgetFocus",DF="historyNavigationForwardsEnabled",RF="historyNavigationBackwardsEnabled",Ta,Zv=[];function MF(i,e){if(Zv.includes(e))throw new Error("Cannot register the same widget multiple times");Zv.push(e);let t=new W,n=new Ne(bC,!1).bindTo(i),r=new Ne(DF,!0).bindTo(i),o=new Ne(RF,!0).bindTo(i),s=()=>{n.set(!0),Ta=e},a=()=>{n.set(!1),Ta===e&&(Ta=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(ft(()=>{Zv.splice(Zv.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}var e4=class extends Fk{constructor(e,t,n,r){super(e,t,n);let o=this._register(r.createScoped(this.inputBox.element));this._register(MF(o,this.inputBox))}};e4=LF([NF(3,we)],e4);var t4=class extends Jv{constructor(e,t,n,r,o=!1){super(e,t,o,n);let s=this._register(r.createScoped(this.inputBox.element));this._register(MF(s,this.inputBox))}};t4=LF([NF(3,we)],t4);Er.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:$.and($.has(bC),$.equals(RF,!0),i4.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Ta==null||Ta.showPreviousValue()}});Er.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:$.and($.has(bC),$.equals(DF,!0),i4.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Ta==null||Ta.showNextValue()}});function yC(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}An();cn();er();ek();ii();var mZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},pZ=Qt("find-selection",Re.selection,g("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),OF=Qt("find-collapsed",Re.chevronRight,g("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),PF=Qt("find-expanded",Re.chevronDown,g("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),fZ=Qt("find-replace",Re.replace,g("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),gZ=Qt("find-replace-all",Re.replaceAll,g("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),_Z=Qt("find-previous-match",Re.arrowUp,g("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),vZ=Qt("find-next-match",Re.arrowDown,g("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),bZ=g("label.find","Find"),yZ=g("placeholder.find","Find"),SZ=g("label.previousMatchButton","Previous Match"),CZ=g("label.nextMatchButton","Next Match"),wZ=g("label.toggleSelectionFind","Find in Selection"),xZ=g("label.closeButton","Close"),EZ=g("label.replace","Replace"),TZ=g("placeholder.replace","Replace"),IZ=g("label.replaceButton","Replace"),kZ=g("label.replaceAllButton","Replace All"),AZ=g("label.toggleReplaceButton","Toggle Replace"),LZ=g("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Cs),NZ=g("label.matchesLocation","{0} of {1}"),FF=g("label.noResults","No results"),xs=419,DZ=275,RZ=DZ-54,z0=69,MZ=33,HF="ctrlEnterReplaceAll.windows.donotask",BF=Wi?256:2048,U0=class{constructor(e){this.afterLineNumber=e,this.heightInPx=MZ,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}};function zF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function UF(i,e,t){let n=!!e.match(/\n/);if(t&&n&&t.selectionEnd this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(88)&&(this._codeEditor.getOption(88)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(140)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(39)){let h=this._codeEditor.getOption(39).loop;this._state.change({loop:h},!1);let u=this._codeEditor.getOption(39).addExtraSpaceOnTop;u&&!this._viewZone&&(this._viewZone=new U0(0),this._showViewZone()),!u&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>mZ(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=Yh.bindTo(s),this._findFocusTracker=this._register(zs(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=R0.bindTo(s),this._replaceFocusTracker=this._register(zs(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(39).addExtraSpaceOnTop&&(this._viewZone=new U0(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return i.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(88)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Bo(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Be)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=z0+"px",this._state.matchesCount>=Cs?this._matchesCount.title=LZ:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Cs&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=xr(NZ,n,t)}else e=FF;this._matchesCount.appendChild(document.createTextNode(e)),Kt(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),z0=Math.max(z0,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===FF)return n===""?g("ariaSearchNoResultEmpty","{0} found",e):g("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){let r=g("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${r}`:r}return g("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let n=!this._codeEditor.getOption(88);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;let e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(39).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{let n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(39).seedSearchStringFromSelection&&e){let n=this._codeEditor.getDomNode();if(n){let r=xn(n),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=r.left+(o?o.left:0),a=o?o.top:0;if(this._viewZone&&a e.startLineNumber&&(t=!1);let l=ST(this._domNode).left;s>l&&(t=!1);let c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());r.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(39).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;let n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(r=>{n.heightInPx=this._getHeight(),this._viewZoneId=r.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(39).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new U0(0));let n=this._viewZone;this._codeEditor.changeViewZones(r=>{if(this._viewZoneId!==void 0){let o=this._getHeight();if(o===n.heightInPx)return;let s=o-n.heightInPx;n.heightInPx=o,r.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s);return}else{let o=this._getHeight();if(o-=this._codeEditor.getOption(81).top,o<=0)return;n.heightInPx=o,this._viewZoneId=r.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!vT(this._domNode))return;let e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");let n=e.width,r=e.minimap.minimapWidth,o=!1,s=!1,a=!1;if(this._resized&&Bo(this._domNode)>xs){this._domNode.style.maxWidth=`${n-28-r-15}px`,this._replaceInput.width=Bo(this._findInput.domNode);return}if(xs+28+r>=n&&(s=!0),xs+28+r-z0>=n&&(a=!0),xs+28+r-z0>=n+50&&(o=!0),this._domNode.classList.toggle("collapsed-find-widget",o),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",s),!a&&!o&&(this._domNode.style.maxWidth=`${n-28-r-15}px`),this._findInput.layout({collapsedFindWidget:o,narrowFindWidget:a,reducedFindWidget:s}),this._resized){let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){let e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));let n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(BF|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return zF(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return UF(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(BF|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Hd&&Ga&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(g("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(HF,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return zF(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return UF(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new e4(null,this._contextViewProvider,{width:RZ,label:bZ,placeholder:yZ,appendCaseSensitiveLabel:this._keybindingLabelFor(dt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(dt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(dt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>yC(this._keybindingService),inputBoxStyles:r9,toggleStyles:n9},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),oT&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new kl({label:SZ+this._keybindingLabelFor(dt.PreviousMatchFindAction),icon:_Z,onTrigger:()=>{$a(this._codeEditor.getAction(dt.PreviousMatchFindAction)).run().then(void 0,Be)}})),this._nextBtn=this._register(new kl({label:CZ+this._keybindingLabelFor(dt.NextMatchFindAction),icon:vZ,onTrigger:()=>{$a(this._codeEditor.getAction(dt.NextMatchFindAction)).run().then(void 0,Be)}}));let n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);let r=document.createElement("div");r.className="find-actions",n.appendChild(r),r.appendChild(this._matchesCount),r.appendChild(this._prevBtn.domNode),r.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new $f({icon:pZ,title:wZ+this._keybindingLabelFor(dt.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:Ko(Mf),inputActiveOptionBorder:Ko(Rf),inputActiveOptionForeground:Ko(Of)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),r.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kl({label:xZ+this._keybindingLabelFor(dt.CloseFindWidgetCommand),icon:Yf,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),r.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new t4(null,void 0,{label:EZ,placeholder:TZ,appendPreserveCaseLabel:this._keybindingLabelFor(dt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>yC(this._keybindingService),inputBoxStyles:r9,toggleStyles:n9},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),l.preventDefault())})),this._replaceBtn=this._register(new kl({label:IZ+this._keybindingLabelFor(dt.ReplaceOneAction),icon:fZ,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new kl({label:kZ+this._keybindingLabelFor(dt.ReplaceAllAction),icon:gZ,onTrigger:()=>{this._controller.replaceAll()}}));let o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);let s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new kl({label:AZ,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${xs}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(o),this._resizeSash=new Ys(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=xs;this._register(this._resizeSash.onDidStart(()=>{a=Bo(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=Bo(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{let l=Bo(this._domNode);if(l {this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var r,o;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(o=(r=this._opts).onKeyDown)===null||o===void 0||o.call(r,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...je.asClassNameArray(OF)),this._domNode.classList.add(...je.asClassNameArray(PF))):(this._domNode.classList.remove(...je.asClassNameArray(PF)),this._domNode.classList.add(...je.asClassNameArray(OF)))}};eh((i,e)=>{let t=(f,_)=>{_&&e.addRule(`.monaco-editor ${f} { background-color: ${_}; }`)};t(".findMatch",i.getColor(zI)),t(".currentFindMatch",i.getColor(BI)),t(".findScope",i.getColor(UI));let n=i.getColor(Ks);t(".find-widget",n);let r=i.getColor(Nf);r&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${r}; }`);let o=i.getColor(Df);o&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${o}; border-right: 1px solid ${o}; border-bottom: 1px solid ${o}; }`);let s=i.getColor(jI);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${d1(i.type)?"dotted":"solid"} ${s}; box-sizing: border-box; }`);let a=i.getColor(WI);a&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${a}; padding: 1px; box-sizing: border-box; }`);let l=i.getColor(VI);l&&e.addRule(`.monaco-editor .findScope { border: 1px ${d1(i.type)?"dashed":"solid"} ${l}; }`);let c=i.getColor(Yr);c&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${c}; }`);let d=i.getColor(PI);d&&e.addRule(`.monaco-editor .find-widget { color: ${d}; }`);let h=i.getColor(TI);h&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);let u=i.getColor(FI);if(u)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{let f=i.getColor(uc);f&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${f}; }`)}let m=i.getColor(ZI);m&&e.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${m} !important; } - `);let p=i.getColor(II);p&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${p}; }`)});be();mi();qe();un();cn();var WF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Es=function(i,e){return function(t,n){e(t,n,i)}},qc=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},OZ=524288;function SC(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n) this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!Yh.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ws(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return qc(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=SC(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=Ws(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=SC(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Yv(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return qc(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};tn.ID="editor.contrib.findController";tn=WF([Es(1,we),Es(2,Ar),Es(3,qs)],tn);var CC=class extends tn{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return qc(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new W0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new B0(this._editor,this._state,this._keybindingService))}};CC=WF([Es(1,ol),Es(2,we),Es(3,mt),Es(4,qi),Es(5,ri),Es(6,Ar),Es(7,qs)],CC);var PZ=W2(new U2({id:dt.StartFindAction,label:g("startFindAction","Find"),alias:"Find",precondition:G.or(I.focus,G.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));PZ.addImplementation(0,(i,e,t)=>{let n=tn.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop}):!1});var FZ={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:g("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. + `);let p=i.getColor(II);p&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${p}; }`)});be();mi();qe();un();cn();var WF=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Es=function(i,e){return function(t,n){e(t,n,i)}},qc=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},OZ=524288;function SC(i,e="single",t=!1){if(!i.hasModel())return null;let n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){let r=i.getConfiguredWordAtPosition(n.getStartPosition());if(r&&t===!1)return r.word}else if(i.getModel().getValueLengthInRange(n) this._onStateChanged(o))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let o=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),o&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(39).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!Yh.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ws(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return qc(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){let r=SC(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);r&&(this._state.isRegex?n.searchString=Ws(r):n.searchString=r)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let r=SC(this._editor,e.seedSearchStringFromSelection);r&&(n.searchString=r)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){let r=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;r&&(n.searchString=r)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){let r=this._editor.getSelections();r.some(o=>!o.isEmpty())&&(n.searchScope=r)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Yv(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return qc(this,void 0,void 0,function*(){return this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(39).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};tn.ID="editor.contrib.findController";tn=WF([Es(1,we),Es(2,Ar),Es(3,qs)],tn);var CC=class extends tn{constructor(e,t,n,r,o,s,a,l){super(e,n,a,l),this._contextViewService=t,this._keybindingService=r,this._themeService=o,this._notificationService=s,this._widget=null,this._findOptionsWidget=null}_start(e,t){let n=Object.create(null,{_start:{get:()=>super._start}});return qc(this,void 0,void 0,function*(){this._widget||this._createFindWidget();let r=this._editor.getSelection(),o=!1;switch(this._editor.getOption(39).autoFindInSelection){case"always":o=!0;break;case"never":o=!1;break;case"multiline":{o=!!r&&r.startLineNumber!==r.endLineNumber;break}default:break}e.updateSearchScope=e.updateSearchScope||o,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new W0(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new B0(this._editor,this._state,this._keybindingService))}};CC=WF([Es(1,ol),Es(2,we),Es(3,mt),Es(4,qi),Es(5,ri),Es(6,Ar),Es(7,qs)],CC);var PZ=W2(new U2({id:dt.StartFindAction,label:g("startFindAction","Find"),alias:"Find",precondition:$.or(I.focus,$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));PZ.addImplementation(0,(i,e,t)=>{let n=tn.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop}):!1});var FZ={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:g("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True @@ -341,7 +341,7 @@ The flag will not be saved for the future. The flag will not be saved for the future. 0: Do Nothing 1: True -2: False`)},findInSelection:{type:"boolean"}}}}]},wC=class extends K{constructor(){super({id:dt.StartFindWithArgs,label:g("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:FZ})}run(e,t,n){return qc(this,void 0,void 0,function*(){let r=tn.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(39).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},xC=class extends K{constructor(){super({id:dt.StartFindWithSelection,label:g("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},n4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},EC=class extends n4{constructor(){super({id:dt.NextMatchFindAction,label:g("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:G.and(I.focus,Yh),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},TC=class extends n4{constructor(){super({id:dt.PreviousMatchFindAction,label:g("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:G.and(I.focus,Yh),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},IC=class extends K{constructor(){super({id:dt.GoToMatchFindAction,label:g("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:ws}),this._highlightDecorations=[]}run(e,t,n){let r=tn.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(ri).notify({severity:rh.Warning,message:g("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(rr).createInputBox();a.placeholder=g("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let h=parseInt(d);if(isNaN(h))return;let u=r.getState().matchesCount;if(h>0&&h<=u)return h-1;if(h<0&&h>=-u)return u+h},c=d=>{let h=l(d);if(typeof h=="number"){a.validationMessage=void 0,r.goToMatch(h);let u=r.getState().currentMatch;u&&this.addDecorations(t,u)}else a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Lt(Hf),position:Wn.Full}}}])})}},r4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);if(!n)return;let r=SC(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},kC=class extends r4{constructor(){super({id:dt.NextSelectionMatchFindAction,label:g("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},AC=class extends r4{constructor(){super({id:dt.PreviousSelectionMatchFindAction,label:g("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},HZ=W2(new U2({id:dt.StartFindReplaceAction,label:g("startReplace","Replace"),alias:"Replace",precondition:G.or(I.focus,G.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));HZ.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=tn.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(39).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop})});Se(tn.ID,CC,0);F(wC);F(xC);F(EC);F(TC);F(IC);F(kC);F(AC);var ko=ni.bindToContribution(tn.get);ge(new ko({id:dt.CloseFindWidgetCommand,precondition:ws,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,G.not("isComposing")),primary:9,secondary:[1033]}}));ge(new ko({id:dt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:M0.primary,mac:M0.mac,win:M0.win,linux:M0.linux}}));ge(new ko({id:dt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:O0.primary,mac:O0.mac,win:O0.win,linux:O0.linux}}));ge(new ko({id:dt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:P0.primary,mac:P0.mac,win:P0.win,linux:P0.linux}}));ge(new ko({id:dt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:F0.primary,mac:F0.mac,win:F0.win,linux:F0.linux}}));ge(new ko({id:dt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:H0.primary,mac:H0.mac,win:H0.win,linux:H0.linux}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:3094}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,R0),primary:3}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:2563}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:G.and(I.focus,R0),primary:void 0,mac:{primary:2051}}}));ge(new ko({id:dt.SelectAllMatchesAction,precondition:ws,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:515}}));ct();Gt();it();Bs();re();Bt();ii();c9();Me();ht();dn();ln();wt();var BZ={0:" ",1:"u",2:"r"},VF=65535,Or=16777215,KF=4278190080,j0=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1< VF)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new j0(e.length),this._userDefinedStates=new j0(e.length),this._recoveredStates=new j0(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;n Or||s>Or)throw new Error("startLineNumber or endLineNumber must not exceed "+Or);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Or}getEndLineNumber(e){return this._endIndexes[e]&Or}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r >>24)+((this._endIndexes[e]&KF)>>>16);return t===VF?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t =0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t Array.isArray(f)?b=>b<_?f[b]:void 0:b=>b<_?f.toFoldRange(b):void 0,o=r(e,e.length),s=r(t,t.length),a=0,l=0,c=o(0),d=s(0),h=[],u,m=0,p=[];for(;c||d;){let f;if(d&&(!c||c.startLineNumber>=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?f=d:(f=c,f.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,f.source=0),c=o(++a)):(f=d,d.isCollapsed&&d.source===0&&(f.source=2)),d=s(++l);else{let _=l,b=d;for(;;){if(!b||b.startLineNumber>c.endLineNumber){f=c;break}if(b.source===1&&b.endLineNumber>c.endLineNumber)break;b=s(++_)}c=o(++a)}if(f){for(;u&&u.endLineNumber f.startLineNumber&&f.startLineNumber>m&&f.endLineNumber<=n&&(!u||u.endLineNumber>=f.endLineNumber)&&(p.push(f),m=f.startLineNumber,u&&h.push(u),u=f)}}return p}},LC=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}};var o4=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new De,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new nn(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;r s&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let h=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,h),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;r n&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r =s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=nn.sanitizeAndMerge(this._regions,r,o);this.updatePost(nn.fromFoldRanges(s))}_getLinesChecksum(e,t){return Xf(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c 0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c s.isCollapsed!==e&&a a.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function GF(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function $F(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function DC(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function s4(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function a4(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function YF(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function XF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function QF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex =r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||yI(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n 0}isHidden(e){return JF(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!zZ(s,r))&&(r=JF(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}};function zZ(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function JF(i,e){let t=bf(i,n=>e =0&&i[t].endLineNumber>=e?i[t]:null}ik();var UZ=5e3,WZ="indent",$c=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=WZ}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(VZ(this.editorModel,n,r,this.foldingRangesLimit))}},RC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Or||t>Or)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new nn(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;l t){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],h=e.getLineContent(d),u=h1(h,o);(u {}};function VZ(i,e,t,n=jZ){let r=i.getOptions().tabSize,o=new RC(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),h=h1(d,r),u=a[a.length-1];if(h===-1){e&&(u.endAbove=c);continue}let m;if(s&&(m=d.match(s)))if(m[1]){let p=a.length-1;for(;p>0&&a[p].indent!==-2;)p--;if(p>0){a.length=p+1,u=a[p],o.insertFirst(c,u.line,h),u.line=c,u.indent=h,u.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(u.indent>h){do a.pop(),u=a[a.length-1];while(u.indent>h);let p=u.endAbove-1;p-c>=1&&o.insertFirst(c,p,h)}u.indent===h?u.endAbove=c:a.push({indent:h,endAbove:c,line:c})}return o.toIndentRanges(i)}be();qe();sn();rl();hn();be();An();cn();er();var KZ=pe("editor.foldBackground",{light:kn(X2,.3),dark:kn(X2,.3),hcDark:null,hcLight:null},g("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);pe("editorGutter.foldingControlForeground",{dark:i1,light:i1,hcDark:i1,hcLight:i1},g("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));var MC=Qt("folding-expanded",Re.chevronDown,g("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),OC=Qt("folding-collapsed",Re.chevronRight,g("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),ZF=Qt("folding-manual-collapsed",OC,g("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),eH=Qt("folding-manual-expanded",MC,g("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),PC={color:Lt(KZ),position:Vo.Inline},Pn=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Pn.COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:je.asClassName(OC)});Pn.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(OC)});Pn.MANUALLY_COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:je.asClassName(ZF)});Pn.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(ZF)});Pn.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Pn.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0});Pn.EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+je.asClassName(MC)});Pn.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(MC)});Pn.MANUALLY_EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+je.asClassName(eH)});Pn.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(eH)});Pn.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Pn.HIDDEN_RANGE_DECORATION=Ue.register({description:"folding-hidden-range-decoration",stickiness:1});it();re();var qZ={},GZ="syntax",Yc=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=GZ,this.disposables=new W,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return $Z(this.providers,this.editorModel,e).then(t=>{var n,r;return t?YZ(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};function $Z(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,qZ,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},bt));return Promise.all(r).then(o=>n)}var FC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Or||t>Or)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;r e){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a {let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new FC(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}ec();ut();wt();Ci();wn();Ya();an();var QZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V0=function(i,e){return function(t,n){e(t,n,i)}},JZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ji=new Ne("foldingEnabled",!1),Ts=class K0 extends Y{static get(e){return e.getContribution(K0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=K0._foldingRangeSelector)===null||n===void 0?void 0:n.call(K0,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new W),this.editor=e,this._foldingLimitReporter=new q0(e);let a=this.editor.getOptions();this._isEnabled=a.get(41),this._useFoldingProviders=a.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(44),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Pn(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Ji.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(45)&&this.onModelChanged(),l.hasChanged(106)||l.hasChanged(43)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(106),this.foldingDecorationProvider.showFoldingHighlights=c.get(43),this.triggerFoldingModelChanged()}l.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),l.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new o4(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new l4(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ir(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new kt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new $c(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=K0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Yc(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Cn(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Ht(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(th.Imports.value,!0);d&&(s=pc.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(Be(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,Be)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<5)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=u=>!u.containedBy(s)&&!s.containedBy(u),h=t.getRegionsInside(null,d);for(let u of h)u.isCollapsed&&c.push(u);c.length===0&&(c=h)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let h of t.getRegionsInside(s))h.isCollapsed===a&&c.push(h);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Ts.ID="editor.contrib.folding";Ts=QZ([V0(1,we),V0(2,rt),V0(3,ri),V0(4,Gi),V0(5,le)],Ts);var q0=class{constructor(e){this.editor=e,this._onDidChange=new De,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Fi=class extends K{runEditorCommand(e,t,n){let r=e.get(rt),o=Ts.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};function tH(i){if(!$u(i)){if(!af(i))return!1;let e=i;if(!$u(e.levels)&&!N2(e.levels)||!$u(e.direction)&&!sf(e.direction)||!$u(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(N2)))return!1}return!0}var HC=class extends Fi{constructor(){super({id:"editor.unfold",label:g("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Ji,kbOpts:{kbExpr:I.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: +2: False`)},findInSelection:{type:"boolean"}}}}]},wC=class extends K{constructor(){super({id:dt.StartFindWithArgs,label:g("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:FZ})}run(e,t,n){return qc(this,void 0,void 0,function*(){let r=tn.get(t);if(r){let o=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield r.start({forceRevealReplace:!1,seedSearchStringFromSelection:r.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(39).loop},o),r.setGlobalBufferTerm(r.getState().searchString)}})}},xC=class extends K{constructor(){super({id:dt.StartFindWithSelection,label:g("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}},n4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(39).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},EC=class extends n4{constructor(){super({id:dt.NextMatchFindAction,label:g("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:$.and(I.focus,Yh),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}},TC=class extends n4{constructor(){super({id:dt.PreviousMatchFindAction,label:g("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:I.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:$.and(I.focus,Yh),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}},IC=class extends K{constructor(){super({id:dt.GoToMatchFindAction,label:g("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:ws}),this._highlightDecorations=[]}run(e,t,n){let r=tn.get(t);if(!r)return;let o=r.getState().matchesCount;if(o<1){e.get(ri).notify({severity:rh.Warning,message:g("findMatchAction.noResults","No matches. Try searching for something else.")});return}let a=e.get(rr).createInputBox();a.placeholder=g("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);let l=d=>{let h=parseInt(d);if(isNaN(h))return;let u=r.getState().matchesCount;if(h>0&&h<=u)return h-1;if(h<0&&h>=-u)return u+h},c=d=>{let h=l(d);if(typeof h=="number"){a.validationMessage=void 0,r.goToMatch(h);let u=r.getState().currentMatch;u&&this.addDecorations(t,u)}else a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount),this.clearDecorations(t)};a.onDidChangeValue(d=>{c(d)}),a.onDidAccept(()=>{let d=l(a.value);typeof d=="number"?(r.goToMatch(d),a.hide()):a.validationMessage=g("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",r.getState().matchesCount)}),a.onDidHide(()=>{this.clearDecorations(t),a.dispose()}),a.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Lt(Hf),position:Wn.Full}}}])})}},r4=class extends K{run(e,t){return qc(this,void 0,void 0,function*(){let n=tn.get(t);if(!n)return;let r=SC(t,"single",!1);r&&n.setSearchString(r),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(39).loop}),this._run(n))})}},kC=class extends r4{constructor(){super({id:dt.NextSelectionMatchFindAction,label:g("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}},AC=class extends r4{constructor(){super({id:dt.PreviousSelectionMatchFindAction,label:g("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:I.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}},HZ=W2(new U2({id:dt.StartFindReplaceAction,label:g("startReplace","Replace"),alias:"Replace",precondition:$.or(I.focus,$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ae.MenubarEditMenu,group:"3_find",title:g({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));HZ.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(88))return!1;let n=tn.get(e);if(!n)return!1;let r=e.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&e.getOption(39).seedSearchStringFromSelection!=="never"&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(39).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(39).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(39).loop})});Se(tn.ID,CC,0);F(wC);F(xC);F(EC);F(TC);F(IC);F(kC);F(AC);var ko=ni.bindToContribution(tn.get);ge(new ko({id:dt.CloseFindWidgetCommand,precondition:ws,handler:i=>i.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:$.and(I.focus,$.not("isComposing")),primary:9,secondary:[1033]}}));ge(new ko({id:dt.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:M0.primary,mac:M0.mac,win:M0.win,linux:M0.linux}}));ge(new ko({id:dt.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:O0.primary,mac:O0.mac,win:O0.win,linux:O0.linux}}));ge(new ko({id:dt.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:P0.primary,mac:P0.mac,win:P0.win,linux:P0.linux}}));ge(new ko({id:dt.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:F0.primary,mac:F0.mac,win:F0.win,linux:F0.linux}}));ge(new ko({id:dt.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:H0.primary,mac:H0.mac,win:H0.win,linux:H0.linux}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:3094}}));ge(new ko({id:dt.ReplaceOneAction,precondition:ws,handler:i=>i.replace(),kbOpts:{weight:100+5,kbExpr:$.and(I.focus,R0),primary:3}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:2563}}));ge(new ko({id:dt.ReplaceAllAction,precondition:ws,handler:i=>i.replaceAll(),kbOpts:{weight:100+5,kbExpr:$.and(I.focus,R0),primary:void 0,mac:{primary:2051}}}));ge(new ko({id:dt.SelectAllMatchesAction,precondition:ws,handler:i=>i.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:I.focus,primary:515}}));ct();Gt();it();Bs();re();Bt();ii();c9();Me();ht();dn();ln();wt();var BZ={0:" ",1:"u",2:"r"},VF=65535,Or=16777215,KF=4278190080,j0=class{constructor(e){let t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){let t=e/32|0,n=e%32;return(this._states[t]&1< VF)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new j0(e.length),this._userDefinedStates=new j0(e.length),this._recoveredStates=new j0(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(n,r)=>{let o=e[e.length-1];return this.getStartLineNumber(o)<=n&&this.getEndLineNumber(o)>=r};for(let n=0,r=this._startIndexes.length;n Or||s>Or)throw new Error("startLineNumber or endLineNumber must not exceed "+Or);for(;e.length>0&&!t(o,s);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=o+((a&255)<<24),this._endIndexes[n]=s+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Or}getEndLineNumber(e){return this._endIndexes[e]&Or}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let r=0;r >>24)+((this._endIndexes[e]&KF)>>>16);return t===VF?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t =0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t Array.isArray(f)?b=>b<_?f[b]:void 0:b=>b<_?f.toFoldRange(b):void 0,o=r(e,e.length),s=r(t,t.length),a=0,l=0,c=o(0),d=s(0),h=[],u,m=0,p=[];for(;c||d;){let f;if(d&&(!c||c.startLineNumber>=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(d.source===1?f=d:(f=c,f.isCollapsed=d.isCollapsed&&c.endLineNumber===d.endLineNumber,f.source=0),c=o(++a)):(f=d,d.isCollapsed&&d.source===0&&(f.source=2)),d=s(++l);else{let _=l,b=d;for(;;){if(!b||b.startLineNumber>c.endLineNumber){f=c;break}if(b.source===1&&b.endLineNumber>c.endLineNumber)break;b=s(++_)}c=o(++a)}if(f){for(;u&&u.endLineNumber f.startLineNumber&&f.startLineNumber>m&&f.endLineNumber<=n&&(!u||u.endLineNumber>=f.endLineNumber)&&(p.push(f),m=f.startLineNumber,u&&h.push(u),u=f)}}return p}},LC=class{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}};var o4=class{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new De,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new nn(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,r)=>n.regionIndex-r.regionIndex);let t={};this._decorationProvider.changeDecorations(n=>{let r=0,o=-1,s=-1,a=l=>{for(;r s&&(s=c),r++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let h=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,h),o=Math.max(o,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){let t=new Array,n=r=>{for(let o of e)if(!(o.startLineNumber>r.endLineNumber||r.startLineNumber>o.endLineNumber))return!0;return!1};for(let r=0;r n&&(n=a)}this._decorationProvider.changeDecorations(r=>this._editorDecorationIds=r.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){let t=(r,o)=>{for(let s of e)if(r =s.endLineNumber||s.startLineNumber<1||s.endLineNumber>n)continue;let a=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;let r=[],o=this._textModel.getLineCount();for(let a of e){if(a.startLineNumber>=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>o)continue;let l=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);(!a.checksum||l===a.checksum)&&r.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,type:void 0,isCollapsed:(t=a.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=a.source)!==null&&n!==void 0?n:0})}let s=nn.sanitizeAndMerge(this._regions,r,o);this.updatePost(nn.fromFoldRanges(s))}_getLinesChecksum(e,t){return Xf(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){let n=[];if(this._regions){let r=this._regions.findRange(e),o=1;for(;r>=0;){let s=this._regions.toRegion(r);(!t||t(s,o))&&n.push(s),o++,r=s.parentIndex}}return n}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let n=[],r=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){let s=[];for(let a=r,l=this._regions.length;a0&&!c.containedBy(s[s.length-1]);)s.pop();s.push(c),t(c,s.length)&&n.push(c)}else break}}else for(let s=r,a=this._regions.length;s1){let a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==s&&c 0)for(let o of n){let s=i.getRegionAtLine(o);if(s&&(s.isCollapsed!==e&&r.push(s),t>1)){let a=i.getRegionsInside(s,(l,c)=>l.isCollapsed!==e&&c s.isCollapsed!==e&&a a.isCollapsed!==e&&l<=t);r.push(...s)}i.toggleCollapseState(r)}function GF(i,e,t){let n=[];for(let r of t){let o=i.getAllRegionsAtLine(r,s=>s.isCollapsed!==e);o.length>0&&n.push(o[0])}i.toggleCollapseState(n)}function $F(i,e,t,n){let r=(s,a)=>a===e&&s.isCollapsed!==t&&!n.some(l=>s.containsLine(l)),o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function DC(i,e,t){let n=[];for(let s of t){let a=i.getAllRegionsAtLine(s,void 0);a.length>0&&n.push(a[0])}let r=s=>n.every(a=>!a.containedBy(s)&&!s.containedBy(a))&&s.isCollapsed!==e,o=i.getRegionsInside(null,r);i.toggleCollapseState(o)}function s4(i,e,t){let n=i.textModel,r=i.regions,o=[];for(let s=r.length-1;s>=0;s--)if(t!==r.isCollapsed(s)){let a=r.getStartLineNumber(s);e.test(n.getLineContent(a))&&o.push(r.toRegion(s))}i.toggleCollapseState(o)}function a4(i,e,t){let n=i.regions,r=[];for(let o=n.length-1;o>=0;o--)t!==n.isCollapsed(o)&&e===n.getType(o)&&r.push(n.toRegion(o));i.toggleCollapseState(r)}function YF(i,e){let t=null,n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){let r=n.parentIndex;r!==-1?t=e.regions.getStartLineNumber(r):t=null}return t}function XF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{let n=t.parentIndex,r=0;for(n!==-1&&(r=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function QF(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){let n=t.parentIndex,r=0;if(n!==-1)r=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;r=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex =r)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndex this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||yI(t.text)[0]!==0))}updateHiddenRanges(){let e=!1,t=[],n=0,r=0,o=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;for(;n 0}isHidden(e){return JF(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,n=this._foldingModel.textModel,r=null,o=s=>((!r||!zZ(s,r))&&(r=JF(this._hiddenRanges,s)),r?r.startLineNumber-1:null);for(let s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}};function zZ(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function JF(i,e){let t=bf(i,n=>e =0&&i[t].endLineNumber>=e?i[t]:null}ik();var UZ=5e3,WZ="indent",$c=class{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=WZ}dispose(){}compute(e){let t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(VZ(this.editorModel,n,r,this.foldingRangesLimit))}},RC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>Or||t>Or)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){let t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);let n=new Uint32Array(this._length),r=new Uint32Array(this._length);for(let o=this._length-1,s=0;o>=0;o--,s++)n[s]=this._startIndexes[o],r[s]=this._endIndexes[o];return new nn(n,r)}else{this._foldingRangesLimit.update(this._length,t);let n=0,r=this._indentOccurrences.length;for(let l=0;l t){r=l;break}n+=c}}let o=e.getOptions().tabSize,s=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){let d=this._startIndexes[l],h=e.getLineContent(d),u=h1(h,o);(u {}};function VZ(i,e,t,n=jZ){let r=i.getOptions().tabSize,o=new RC(n),s;t&&(s=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){let d=i.getLineContent(c),h=h1(d,r),u=a[a.length-1];if(h===-1){e&&(u.endAbove=c);continue}let m;if(s&&(m=d.match(s)))if(m[1]){let p=a.length-1;for(;p>0&&a[p].indent!==-2;)p--;if(p>0){a.length=p+1,u=a[p],o.insertFirst(c,u.line,h),u.line=c,u.indent=h,u.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(u.indent>h){do a.pop(),u=a[a.length-1];while(u.indent>h);let p=u.endAbove-1;p-c>=1&&o.insertFirst(c,p,h)}u.indent===h?u.endAbove=c:a.push({indent:h,endAbove:c,line:c})}return o.toIndentRanges(i)}be();qe();sn();rl();hn();be();An();cn();er();var KZ=pe("editor.foldBackground",{light:kn(X2,.3),dark:kn(X2,.3),hcDark:null,hcLight:null},g("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);pe("editorGutter.foldingControlForeground",{dark:i1,light:i1,hcDark:i1,hcLight:i1},g("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));var MC=Qt("folding-expanded",Re.chevronDown,g("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),OC=Qt("folding-collapsed",Re.chevronRight,g("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),ZF=Qt("folding-manual-collapsed",OC,g("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),eH=Qt("folding-manual-expanded",MC,g("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),PC={color:Lt(KZ),position:Vo.Inline},Pn=class i{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Pn.COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:je.asClassName(OC)});Pn.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(OC)});Pn.MANUALLY_COLLAPSED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:je.asClassName(ZF)});Pn.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ue.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(ZF)});Pn.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Pn.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:PC,isWholeLine:!0});Pn.EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+je.asClassName(MC)});Pn.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(MC)});Pn.MANUALLY_EXPANDED_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+je.asClassName(eH)});Pn.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ue.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:je.asClassName(eH)});Pn.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Ue.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Pn.HIDDEN_RANGE_DECORATION=Ue.register({description:"folding-hidden-range-decoration",stickiness:1});it();re();var qZ={},GZ="syntax",Yc=class{constructor(e,t,n,r,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=r,this.fallbackRangeProvider=o,this.id=GZ,this.disposables=new W,o&&this.disposables.add(o);for(let s of t)typeof s.onDidChange=="function"&&this.disposables.add(s.onDidChange(n))}compute(e){return $Z(this.providers,this.editorModel,e).then(t=>{var n,r;return t?YZ(t,this.foldingRangesLimit):(r=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}};function $Z(i,e,t){let n=null,r=i.map((o,s)=>Promise.resolve(o.provideFoldingRanges(e,qZ,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:s,kind:c.kind})}},bt));return Promise.all(r).then(o=>n)}var FC=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,r){if(e>Or||t>Or)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=r,this._types[o]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){let e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);let t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let r=0;r e){n=a;break}t+=l}}let r=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let a=0,l=0;a {let l=s.start-a.start;return l===0&&(l=s.rank-a.rank),l}),n=new FC(e),r,o=[];for(let s of t)if(!r)r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else if(s.start>r.start)if(s.end<=r.end)o.push(r),r=s,n.add(s.start,s.end,s.kind&&s.kind.value,o.length);else{if(s.start>r.end){do r=o.pop();while(r&&s.start>r.end);r&&o.push(r),r=s}n.add(s.start,s.end,s.kind&&s.kind.value,o.length)}return n.toIndentRanges()}ec();ut();wt();Ci();wn();Ya();an();var QZ=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},V0=function(i,e){return function(t,n){e(t,n,i)}},JZ=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ji=new Ne("foldingEnabled",!1),Ts=class K0 extends Y{static get(e){return e.getContribution(K0.ID)}static getFoldingRangeProviders(e,t){var n,r;let o=e.foldingRangeProvider.ordered(t);return(r=(n=K0._foldingRangeSelector)===null||n===void 0?void 0:n.call(K0,o,t))!==null&&r!==void 0?r:o}constructor(e,t,n,r,o,s){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=s,this.localToDispose=this._register(new W),this.editor=e,this._foldingLimitReporter=new q0(e);let a=this.editor.getOptions();this._isEnabled=a.get(41),this._useFoldingProviders=a.get(42)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(46),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(44),this.updateDebounceInfo=o.for(s.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Pn(e),this.foldingDecorationProvider.showFoldingControls=a.get(106),this.foldingDecorationProvider.showFoldingHighlights=a.get(43),this.foldingEnabled=Ji.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(41)&&(this._isEnabled=this.editor.getOptions().get(41),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(45)&&this.onModelChanged(),l.hasChanged(106)||l.hasChanged(43)){let c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(106),this.foldingDecorationProvider.showFoldingHighlights=c.get(43),this.triggerFoldingModelChanged()}l.hasChanged(42)&&(this._useFoldingProviders=this.editor.getOptions().get(42)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(46)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(46)),l.hasChanged(44)&&(this._foldingImportsByDefault=this.editor.getOptions().get(44))})),this.onModelChanged()}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new o4(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new l4(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ir(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new kt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;let t=new $c(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){let n=K0.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Yc(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{let e=this.foldingModel;if(!e)return null;let t=new Cn(!0),n=this.getRangeProvider(e.textModel),r=this.foldingRegionPromise=Ht(o=>n.compute(o));return r.then(o=>{if(o&&r===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){let d=o.setCollapsedAllOfType(th.Imports.value,!0);d&&(s=pc.capture(this.editor),this._currentModelHasFoldedImports=d)}let a=this.editor.getSelections(),l=a?a.map(d=>d.startLineNumber):[];e.update(o,l),s==null||s.restore(this.editor);let c=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=c)}return e})}).then(void 0,e=>(Be(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){let e=this.getFoldingModel();e&&e.then(t=>{if(t){let n=this.editor.getSelections();if(n&&n.length>0){let r=[];for(let o of n){let s=o.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(s)&&r.push(...t.getAllRegionsAtLine(s,a=>a.isCollapsed&&s>a.startLineNumber))}r.length&&(t.toggleCollapseState(r),this.reveal(n[0].getPosition()))}}}).then(void 0,Be)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;let t=e.target.range,n=!1;switch(e.target.type){case 4:{let r=e.target.detail,o=e.target.element.offsetLeft;if(r.offsetX-o<5)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let r=this.editor.getModel();if(r&&t.startColumn===r.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){let t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;let n=this.mouseDownInfo.lineNumber,r=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==n)return;if(r){if(e.target.type!==4)return}else{let a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(n))return}let s=t.getRegionAtLine(n);if(s&&s.startLineNumber===n){let a=s.isCollapsed;if(r||a){let l=e.event.altKey,c=[];if(l){let d=u=>!u.containedBy(s)&&!s.containedBy(u),h=t.getRegionsInside(null,d);for(let u of h)u.isCollapsed&&c.push(u);c.length===0&&(c=h)}else{let d=e.event.middleButton||e.event.shiftKey;if(d)for(let h of t.getRegionsInside(s))h.isCollapsed===a&&c.push(h);(a||!d||c.length===0)&&c.push(s)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};Ts.ID="editor.contrib.folding";Ts=QZ([V0(1,we),V0(2,rt),V0(3,ri),V0(4,Gi),V0(5,le)],Ts);var q0=class{constructor(e){this.editor=e,this._onDidChange=new De,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(45)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}},Fi=class extends K{runEditorCommand(e,t,n){let r=e.get(rt),o=Ts.get(t);if(!o)return;let s=o.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(a=>{if(a){this.invoke(o,a,t,n,r);let l=t.getSelection();l&&o.reveal(l.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}};function tH(i){if(!$u(i)){if(!af(i))return!1;let e=i;if(!$u(e.levels)&&!N2(e.levels)||!$u(e.direction)&&!sf(e.direction)||!$u(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(N2)))return!1}return!0}var HC=class extends Fi{constructor(){super({id:"editor.unfold",label:g("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Ji,kbOpts:{kbExpr:I.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. @@ -356,14 +356,14 @@ The flag will not be saved for the future. `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}},Jh=class{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}},x4=class{constructor(e,t,n,r=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=r,this.parts=[new Jh(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` `)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}};var see=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},aee=function(i,e){return function(t,n){e(t,n,i)}},E4=class extends Y{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=Lo("isDisposed",!1),this.currentTextModel=No(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=gn("uiState",r=>{if(this.isDisposed.read(r))return;let o=this.currentTextModel.read(r);if(o!==this.model.targetTextModel.read(r))return;let s=this.model.ghostText.read(r);if(!s)return;let a=s instanceof x4?s.columnRange:void 0,l=[],c=[];function d(f,_){if(c.length>0){let b=c[c.length-1];_&&b.decorations.push(new y1(b.content.length+1,b.content.length+1+f[0].length,_,0)),b.content+=f[0],f=f.slice(1)}for(let b of f)c.push({content:b,decorations:_?[new y1(1,b.length+1,_,0)]:[]})}let h=o.getLineContent(s.lineNumber),u,m=0;for(let f of s.parts){let _=f.lines;u===void 0?(l.push({column:f.column,text:_[0],preview:f.preview}),_=_.slice(1)):d([h.substring(m,f.column-1)],void 0),_.length>0&&(d(_,"ghost-text"),u===void 0&&f.column<=h.length&&(u=f.column)),m=f.column-1}u!==void 0&&d([h.substring(m)],void 0);let p=u!==void 0?new w4(u,h.length+1):void 0;return{replacedRange:a,inlineTexts:l,additionalLines:c,hiddenRange:p,lineNumber:s.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(r),targetTextModel:o}}),this.decorations=gn("decorations",r=>{let o=this.uiState.read(r);if(!o)return[];let s=[];o.replacedRange&&s.push({range:o.replacedRange.toRange(o.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),o.hiddenRange&&s.push({range:o.hiddenRange.toRange(o.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(let a of o.inlineTexts)s.push({range:k.fromPositions(new ie(o.lineNumber,a.column)),options:{description:"ghost-text",after:{content:a.text,inlineClassName:a.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:hc.Left},showIfCollapsed:!0}});return s}),this.additionalLinesWidget=this._register(new p8(this.editor,this.languageService.languageIdCodec,gn("lines",r=>{let o=this.uiState.read(r);return o?{lineNumber:o.lineNumber,additionalLines:o.additionalLines,minReservedLineCount:o.additionalReservedLineCount,targetTextModel:o.targetTextModel}:void 0}))),this._register(ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(gH(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};E4=see([aee(2,ci)],E4);var p8=class extends Y{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=hH("editorOptionChanged",Nt.filter(this.editor.onDidChangeConfiguration,r=>r.hasChanged(31)||r.hasChanged(113)||r.hasChanged(95)||r.hasChanged(90)||r.hasChanged(49)||r.hasChanged(48)||r.hasChanged(64))),this._register(vi("update view zone",r=>{let o=this.lines.read(r);this.editorOptionsChanged.read(r),o?this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){let r=this.editor.getModel();if(!r)return;let{tabSize:o}=r.getOptions();this.editor.changeViewZones(s=>{this._viewZoneId&&(s.removeZone(this._viewZoneId),this._viewZoneId=void 0);let a=Math.max(t.length,n);if(a>0){let l=document.createElement("div");lee(l,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=s.addZone({afterLineNumber:e,heightInLines:a,domNode:l,afterColumnAffinity:1})}})}};function lee(i,e,t,n,r){let o=n.get(31),s=n.get(113),a="none",l=n.get(90),c=n.get(49),d=n.get(48),h=n.get(64),u=new Sf(1e4);u.appendString(' ');for(let f=0,_=t.length;f<_;f++){let b=t[f],C=b.content;u.appendString('"),Zf(i,d);let m=u.build(),p=_H?_H.createHTML(m):m;i.innerHTML=p}var _H=ah("editorGhostText",{createHTML:i=>i});gt();ic();Dt();ct();sn();re();Sn();er();St();dn();be();gt();ic();sn();er();wt();re();ii();be();var cee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},T4=class extends Y{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new lT),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new W,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new em(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new kr(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===em.ID)return this.toggleMenuActionViewItem=new m9(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:je.asClassNameArray((s=n.moreIcon)!==null&&s!==void 0?s:Re.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){let a=n.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Yu){let a=new m9(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,n;let r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return ji(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}},em=class i extends Kr{constructor(e,t){t=t||g("moreActions","More Actions..."),super(i.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return cee(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};em.ID="toolbar.toggle.more";ic();Dt();re();be();mi();qe();un();Qa();var dee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tm=function(i,e){return function(t,n){e(t,n,i)}},I4=class extends T4{constructor(e,t,n,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=s.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=n,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new W),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],n){var r,o,s;this._sessionDisposables.clear();let a=e.slice(),l=t.slice(),c=[],d=0,h=[],u=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let m=0;m');let T=pf(C),w=OT(C),A=hk.createEmpty(C,r);tg(new eg(d.isMonospace&&!o,d.canUseHalfwidthRightwardsArrow,C,!1,T,w,0,A,b.decorations,e,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,s,a,l,c!==pk.OFF,null),u),u.appendString("")}u.appendString("=this._options.maxNumberOfItems&&(a[p]=void 0,h[p]=f)}}q2(a),q2(h),super.setActions(a,fo.join(h,l)),c.length>0&&this._sessionDisposables.add(jt(this.getElement(),"contextmenu",m=>{var p,f,_,b;let C=this.getItemAction(m.target);if(!C)return;m.preventDefault(),m.stopPropagation();let T=!1;if(d===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){T=!0;for(let O=0;O this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>m,getActions:()=>A,menuId:(_=this._options)===null||_===void 0?void 0:_.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(b=this._options)===null||b===void 0?void 0:b.menuOptions),contextKeyService:this._contextKeyService})}))}};I4=dee([tm(2,go),tm(3,we),tm(4,Jo),tm(5,mt),tm(6,Tn)],I4);mi();Ci();qe();st();un();Qa();var v8=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Do=function(i,e){return function(t,n){e(t,n,i)}},k4=class extends Y{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=No(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=gn("position",r=>{var o,s,a;let l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;let c=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);let d=new ie(l.lineNumber,Math.min(c,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=d,d}),this._register(cH("setup content widget",(r,o)=>{let s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;let a=o.add(this.instantiationService.createInstance(Ro,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var c;return(c=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&c!==void 0?c:[]})));e.addContentWidget(a),o.add(ft(()=>e.removeContentWidget(a))),o.add(vi("request explicit",l=>{this.position.read(l)&&s.lastTriggerKind.read(l)!==Yo.Explicit&&s.triggerExplicitly()}))}))}};k4=v8([Do(2,Ce)],k4);var hee=Qt("inline-suggestion-hints-next",Re.chevronRight,g("parameterHintsNextIcon","Icon for show next parameter hint.")),uee=Qt("inline-suggestion-hints-previous",Re.chevronLeft,g("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Ro=class f8 extends Y{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){let r=new Kr(e,t,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService),s=t;return o&&(s=g({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,n,r,o,s,a,l,c,d,h){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=c,this._contextKeyService=d,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${f8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=zd("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[zd("div",{style:{display:"flex"}},[zd("div@actionBar",{className:"custom-actions"}),zd("div@toolBar")])]),this.previousAction=this.createCommandAction(S4,g("previous","Previous"),je.asClassName(uee)),this.availableSuggestionCountAction=new Kr("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(C4,g("next","Next"),je.asClassName(hee)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(ae.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new kt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new kt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];let u=this._register(new kr(this.nodes.actionBar));u.push(this.previousAction,{icon:!0,label:!1}),u.push(this.availableSuggestionCountAction),u.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(_8,this.nodes.toolBar,ae.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:m=>m.startsWith("primary")},actionViewItemProvider:(m,p)=>m instanceof zo?l.createInstance(g8,m,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(m=>{f8._dropDownVisible=m})),this._register(vi("update position",m=>{this._position.read(m),this.editor.layoutContentWidget(this)})),this._register(vi("counts",m=>{let p=this._suggestionCount.read(m),f=this._currentSuggestionIdx.read(m);p!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${f+1}/${p}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),p!==void 0&&p>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(vi("extra commands",m=>{let p=this._extraCommands.read(m);if(Uo(this.lastCommands,p))return;this.lastCommands=p;let f=p.map(_=>({class:void 0,id:_.id,enabled:!0,tooltip:_.tooltip||"",label:_.title,run:b=>this._commandService.executeCommand(_.id)}));for(let[_,b]of this.inlineCompletionsActionsMenus.getActions())for(let C of b)C instanceof zo&&f.push(C);f.length>0&&f.unshift(new fo),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Ro._dropDownVisible=!1;Ro.id=0;Ro=v8([Do(6,Pt),Do(7,Ce),Do(8,mt),Do(9,we),Do(10,go)],Ro);var g8=class extends ng{updateLabel(){let e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){let t=zd("div.keybinding").root;new Gf(t,of,Object.assign({disableTitle:!0},Ek)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},_8=class extends I4{constructor(e,t,n,r,o,s,a,l){super(e,Object.assign({resetMenu:t},n),r,o,s,a,l),this.menuId=t,this.options2=n,this.menuService=r,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,r,o,s,a;let l=[],c=[];ig(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:c},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),c.push(...this.additionalActions),this.setActions(l,c)}setAdditionalSecondaryActions(e){Uo(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};_8=v8([Do(3,go),Do(4,we),Do(5,Jo),Do(6,mt),Do(7,Tn)],_8);Dt();it();re();ii();Zo();St();Ie();dn();ln();Gt();re();St();dn();ln();ut();Bt();Ie();var Jc=class i{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){let n=t?this.range.intersectRanges(t):this.range;if(!n)return this;let r=e.getValueInRange(n,1),o=Xa(r,this.text),s=J0(this.range.getStartPosition(),Z0(r.substring(0,o))),a=this.text.substring(o),l=k.fromPositions(s,this.range.getEndPosition());return new i(l,a)}augments(e){return this.text.startsWith(e.text)&&mee(this.range,e.range)}computeGhostText(e,t,n,r=0){let o=this.removeCommonPrefix(e);if(o.range.endLineNumber!==o.range.startLineNumber)return;let s=e.getLineContent(o.range.startLineNumber),a=Yt(s).length;if(o.range.startColumn-1<=a){let p=Yt(o.text).length,f=s.substring(o.range.startColumn-1,a),_=k.fromPositions(o.range.getStartPosition().delta(0,f.length),o.range.getEndPosition()),b=o.text.startsWith(f)?o.text.substring(f.length):o.text.substring(p);o=new i(_,b)}let c=e.getValueInRange(o.range),d=pee(c,o.text);if(!d)return;let h=o.range.startLineNumber,u=new Array;if(t==="prefix"){let p=d.filter(f=>f.originalLength===0);if(p.length>1||p.length===1&&p[0].originalStart!==c.length)return}let m=o.text.length-r;for(let p of d){let f=o.range.startColumn+p.originalStart+p.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===o.range.startLineNumber&&f 0)return;if(p.modifiedLength===0)continue;let _=p.modifiedStart+p.modifiedLength,b=Math.max(p.modifiedStart,Math.min(_,m)),C=o.text.substring(p.modifiedStart,b),T=o.text.substring(b,Math.max(p.modifiedStart,_));if(C.length>0){let w=nc(C);u.push(new Jh(f,w,!1))}if(T.length>0){let w=nc(T);u.push(new Jh(f,w,!0))}}return new Qh(h,u)}};function mee(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}var ks;function pee(i,e){if((ks==null?void 0:ks.originalValue)===i&&(ks==null?void 0:ks.newValue)===e)return ks==null?void 0:ks.changes;{let t=bH(i,e,!0);if(t){let n=vH(t);if(n>0){let r=bH(i,e,!1);r&&vH(r) 5e3||e.length>5e3)return;function n(c){let d=0;for(let h=0,u=c.length;hd&&(d=m)}return d}let r=Math.max(n(i),n(e));function o(c){if(c<0)throw new Error("unexpected");return r+c+1}function s(c){let d=0,h=0,u=new Int32Array(c.length);for(let m=0,p=c.length;m a},{getElements:()=>l}).ComputeDiff(!1).changes}zT();Gt();it();Ie();tj();QW();ij();JW();ej();function yH(i,e){let t=new CI,n=new xI(t,c=>e.getLanguageConfiguration(c)),r=new wI(new b8([i]),n),o=EI(r,[],void 0,!0),s="",a=i.getLineContent();function l(c,d){if(c.kind===2)if(l(c.openingBracket,d),d=Qd(d,c.openingBracket.length),c.child&&(l(c.child,d),d=Qd(d,c.child.length)),c.closingBracket)l(c.closingBracket,d),d=Qd(d,c.closingBracket.length);else{let u=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);s+=u}else if(c.kind!==3){if(c.kind===0||c.kind===1)s+=a.substring(d,Qd(d,c.length));else if(c.kind===4)for(let h of c.children)l(h,d),d=Qd(d,h.length)}}return l(o,SI),s}var b8=class{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}};var A4=class i{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,n=this.value.charCodeAt(e),r;if(r=i._table[n],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(i.isDigitCharacter(n)){r=8;do t+=1,n=this.value.charCodeAt(e+t);while(i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}if(i.isVariableCharacter(n)){r=9;do n=this.value.charCodeAt(e+ ++t);while(i.isVariableCharacter(n)||i.isDigitCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof i._table[n]=="undefined"&&!i.isDigitCharacter(n)&&!i.isVariableCharacter(n));return this.pos+=t,{type:r,pos:e,len:t}}};A4._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};var Ll=class{constructor(){this._children=[]}appendChild(e){return e instanceof Hi&&this._children[this._children.length-1]instanceof Hi?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:n}=e,r=n.children.indexOf(e),o=n.children.slice(0);o.splice(r,1,...t),n._children=o,function s(a,l){for(let c of a)c.parent=l,s(c.children,c)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Zh)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Hi=class i extends Ll{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new i(this.value)}},L4=class extends Ll{},gr=class i extends L4{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index
t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Zc?this._children[0]:void 0}clone(){let e=new i(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},Zc=class i extends Ll{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Hi&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new i;return this.options.forEach(e.appendChild,e),e}},y8=class i extends Ll{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,n=!1,r=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Mo&&!!o.elseValue)&&(r=this._replace([])),r}_replace(e){let t="";for(let n of this._children)if(n instanceof Mo){let r=e[n.index]||"";r=n.resolve(r),t+=r}else t+=n.toString();return t}toString(){return""}clone(){let e=new i;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Mo=class i extends Ll{constructor(e,t,n,r){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[a-z0-9]+/gi);return t?t.map((n,r)=>r===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new i(this.index,this.shorthandName,this.ifValue,this.elseValue)}},im=class i extends L4{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Hi(t)],!0):!1}clone(){let e=new i(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function SH(i,e){let t=[...i];for(;t.length>0;){let n=t.shift();if(!e(n))break;t.unshift(...n.children)}}var Zh=class i extends Ll{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(n){return n instanceof gr&&(e.push(n),t=!t||t.index r===e?(n=!0,!1):(t+=r.len(),!0)),n?t:-1}fullLen(e){let t=0;return SH([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:n}=e;for(;n;)n instanceof gr&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof im&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new i;return this._children=this.children.map(t=>t.clone()),e}walk(e){SH(this.children,e)}},Pr=class{constructor(){this._scanner=new A4,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){let r=new Zh;return this.parseFragment(e,r),this.ensureFinalTabstop(r,n!=null?n:!1,t!=null?t:!1),r}parseFragment(e,t){let n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let r=new Map,o=[];t.walk(l=>(l instanceof gr&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));let s=(l,c)=>{let d=r.get(l.index);if(!d)return;let h=new gr(l.index);h.transform=l.transform;for(let u of d){let m=u.clone();h.appendChild(m),m instanceof gr&&r.has(m.index)&&!c.has(m.index)&&(c.add(m.index),s(m,c),c.delete(m.index))}t.replace(l,[h])},a=new Set;for(let l of o)s(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new gr(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}let n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Hi(t)),!0):!1}_parseTabstopOrVariableName(e){let t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new gr(Number(t)):new im(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);let o=new gr(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Hi("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new Zc;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){let t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;n.push(r)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new Hi(n.join(""))),!0)}_parseComplexVariable(e){let t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);let o=new im(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Hi("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){let t=new y8,n="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new Hi(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);let r=this._accept(8,!0);if(r)if(n){if(this._accept(4))return e.appendChild(new Mo(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Mo(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){let o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Mo(Number(r),o)),!0)}else if(this._accept(11)){let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){let o=this._until(1);if(o){let s=this._until(4);if(s)return e.appendChild(new Mo(Number(r),void 0,o,s)),!0}}else{let o=this._until(4);if(o)return e.appendChild(new Mo(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Hi(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};var CH=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})};function xH(i,e,t,n,r=ze.None,o){return CH(this,void 0,void 0,function*(){let s=fee(e,t),a=i.all(t),l=yield Promise.all(a.map(h=>CH(this,void 0,void 0,function*(){try{let u=yield h.provideInlineCompletions(t,e,n,r);return{provider:h,completions:u}}catch(u){bt(u)}return{provider:h,completions:void 0}}))),c=new Map,d=[];for(let h of l){let u=h.completions;if(!u)continue;let m=new C8(u,h.provider);d.push(m);for(let p of u.items){let f=w8.from(p,m,s,t,o);c.set(f.hash(),f)}}return new S8(Array.from(c.values()),new Set(c.keys()),d)})}var S8=class{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(let e of this.providerResults)e.removeRef()}},C8=class{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}},w8=class i{static from(e,t,n,r,o){let s,a,l=e.range?k.lift(e.range):n;if(typeof e.insertText=="string"){if(s=e.insertText,o&&e.completeBracketPairs){s=wH(s,l.getStartPosition(),r,o);let c=s.length-e.insertText.length;c!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+c))}a=void 0}else if("snippet"in e.insertText){let c=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=wH(e.insertText.snippet,l.getStartPosition(),r,o);let h=e.insertText.snippet.length-c;h!==0&&(l=new k(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+h))}let d=new Pr().parse(e.insertText.snippet);d.children.length===1&&d.children[0]instanceof Hi?(s=d.children[0].value,a=void 0):(s=d.toString(),a={snippet:e.insertText.snippet,range:l})}else HT(e.insertText);return new i(s,e.command,l,s,a,e.additionalTextEdits||fH(),e,t)}constructor(e,t,n,r,o,s,a,l){this.filterText=e,this.command=t,this.range=n,this.insertText=r,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=a,this.source=l,e=e.replace(/\r\n|\r/g,` `),r=e.replace(/\r\n|\r/g,` -`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}};function fee(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new k(i.lineNumber,t.startColumn,i.lineNumber,n):k.fromPositions(i,i.with(void 0,n))}function wH(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?yH(a,n):i}var gee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EH=function(i,e){return function(t,n){e(t,n,i)}},_ee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N4=class extends Y{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new li),this.inlineCompletions=Q0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Q0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new x8(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new qt,d=(()=>_ee(this,void 0,void 0,function*(){if((l||t.triggerKind===Yo.Automatic)&&(yield vee(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let m=new Date,p=yield xH(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date;this._debounceValue.update(this.textModel,f.getTime()-m.getTime());let _=new T8(p,s,this.textModel,this.versionId);if(n){let b=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!p.has(b)&&_.prepend(n.inlineCompletion,b.range,!0)}return this._updateOperation.clear(),_i(b=>{a.set(_,b)}),!0}))(),h=new E8(s,c,d);return this._updateOperation.value=h,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};N4=gee([EH(3,le),EH(4,rt)],N4);function vee(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}var x8=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&bee(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===Yo.Automatic||this.context.triggerKind===Yo.Explicit)&&this.versionId===e.versionId}};function bee(i,e,t){return!i||!e?i===e:t(i,e)}var E8=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},T8=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=gn("ranges",s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new D4(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new D4(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},D4=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),h=o.substring(a),u=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=u&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!sI(h,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return TH(this._getUpdatedRange(e)).isBefore(TH(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}};function TH(i){return i.startLineNumber===i.endLineNumber?new ie(1,1+i.endColumn-i.startColumn):new ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}re();ii();Me();St();ht();ln();ut();Gt();it();re();ec();ii();wn();St();Ie();Us();be();mi();Ci();qe();ut();var nm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Le={Visible:i4,HasFocusedSuggestion:new Ne("suggestWidgetHasFocusedSuggestion",!1,g("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Ne("suggestWidgetDetailsVisible",!1,g("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Ne("suggestWidgetMultipleSuggestions",!1,g("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Ne("suggestionMakesTextEdit",!0,g("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Ne("acceptSuggestionOnEnter",!0,g("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Ne("suggestionHasInsertAndReplaceRange",!1,g("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Ne("suggestionInsertMode",void 0,{type:"string",description:g("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Ne("suggestionCanResolve",!1,g("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ls=new ae("suggestWidgetStatusBar"),I8=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=Vs.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,k.isIRange(t.range)?(this.editStart=new ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return nm(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{Wr(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},ka=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};ka.default=new ka;var eu;function IH(){return eu}var k8=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};function rm(i,e,t,n=ka.default,r={triggerKind:0},o=ze.None){return nm(this,void 0,void 0,function*(){let s=new Cn(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new k(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):k.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],h=new W,u=[],m=!1,p=(_,b,C)=>{var T,w,A;let O=!1;if(!b)return O;for(let R of b.suggestions)if(!n.kindFilter.has(R.kind)){if(!n.showDeprecated&&(!((T=R==null?void 0:R.tags)===null||T===void 0)&&T.includes(1)))continue;R.range||(R.range=c),R.sortText||(R.sortText=typeof R.label=="string"?R.label:R.label.label),!m&&R.insertTextRules&&R.insertTextRules&4&&(m=Pr.guessNeedsClipboard(R.insertText)),d.push(new I8(t,R,b,_)),O=!0}return tf(b)&&h.add(b),u.push({providerName:(w=_._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(A=b.duration)!==null&&A!==void 0?A:-1,elapsedOverall:C.elapsed()}),O},f=(()=>nm(this,void 0,void 0,function*(){if(!eu||n.kindFilter.has(27))return;let _=n.providerItemsToReuse.get(eu);if(_){_.forEach(T=>d.push(T));return}if(n.providerFilter.size>0&&!n.providerFilter.has(eu))return;let b=new Cn(!0),C=yield eu.provideCompletionItems(e,t,r,o);p(eu,C,b)}))();for(let _ of i.orderedGroups(e)){let b=!1;if(yield Promise.all(_.map(C=>nm(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(C)){let T=n.providerItemsToReuse.get(C);T.forEach(w=>d.push(w)),b=b||T.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(C)))try{let T=new Cn(!0),w=yield C.provideCompletionItems(e,t,r,o);b=p(C,w,T)||b}catch(T){bt(T)}}))),b||o.isCancellationRequested)break}return yield f,o.isCancellationRequested?(h.dispose(),Promise.reject(new Zp)):new k8(d.sort(Cee(n.snippetSortOrder)),m,{entries:u,elapsed:s.elapsed()},h)})}function A8(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow e.sortTextLow)return 1}return i.textLabel e.textLabel?1:i.completion.kind-e.completion.kind}function yee(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return A8(i,e)}function See(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return A8(i,e)}var R4=new Map;R4.set(0,yee);R4.set(2,See);R4.set(1,A8);function Cee(i){return R4.get(i)}Je.registerCommand("_executeCompletionItemProvider",(i,...e)=>nm(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;ot(Qe.isUri(t)),ot(ie.isIPosition(n)),ot(typeof r=="string"||!r),ot(typeof o=="number"||!o);let{completionProvider:s}=i.get(le),a=yield i.get(Ki).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),h=yield rm(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let u of h.items)c.length<(o!=null?o:0)&&c.push(u.resolve(ze.None)),l.incomplete=l.incomplete||u.container.incomplete,l.suggestions.push(u.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>h.disposable.dispose(),100)}}finally{a.dispose()}}));function kH(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var As=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}};be();qe();ff();Dt();re();Bt();Zo();Ie();Mi();ln();hn();YW();Sn();function L8(i,e=Hd){return hI(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}_T();Tr();Bt();var M4=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r =0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xee=function(i,e){return function(t,n){e(t,n,i)}},VCe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),om=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},sm=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Yt(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Hi&&(a=Yt(nc(c.value).pop())),!0));let l=Xa(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,h)=>`${d}${a.substr(l)}${h}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},am=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Bd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Bd(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return gT(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(Gd(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},lm=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!kT(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},cm=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};cm=wee([xee(2,rt)],cm);var Aa=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};Aa.dayNames=[g("Sunday","Sunday"),g("Monday","Monday"),g("Tuesday","Tuesday"),g("Wednesday","Wednesday"),g("Thursday","Thursday"),g("Friday","Friday"),g("Saturday","Saturday")];Aa.dayNamesShort=[g("SundayShort","Sun"),g("MondayShort","Mon"),g("TuesdayShort","Tue"),g("WednesdayShort","Wed"),g("ThursdayShort","Thu"),g("FridayShort","Fri"),g("SaturdayShort","Sat")];Aa.monthNames=[g("January","January"),g("February","February"),g("March","March"),g("April","April"),g("May","May"),g("June","June"),g("July","July"),g("August","August"),g("September","September"),g("October","October"),g("November","November"),g("December","December")];Aa.monthNamesShort=[g("JanuaryShort","Jan"),g("FebruaryShort","Feb"),g("MarchShort","Mar"),g("AprilShort","Apr"),g("MayShort","May"),g("JuneShort","Jun"),g("JulyShort","Jul"),g("AugustShort","Aug"),g("SeptemberShort","Sep"),g("OctoberShort","Oct"),g("NovemberShort","Nov"),g("DecemberShort","Dec")];var dm=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=Nk(this._workspaceService.getWorkspace());if(!Lk(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(s9(e))return Bd(e.uri.path);let t=Bd(e.configPath.path);return t.endsWith(a9)&&(t=t.substr(0,t.length-a9.length-1)),t}_resoveWorkspacePath(e){if(s9(e))return L8(e.uri.fsPath);let t=Bd(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?L8(n):"/"}},hm=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return M4()}};var Eee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Tee=function(i,e){return function(t,n){e(t,n,i)}},um=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=K2(t.placeholders,gr.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=k.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d 0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx 0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new ye(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let h=this._placeholderDecorations.get(d);r.changeDecorationOptions(h,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof gr){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Zc,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),h=k.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),u=n.addDecoration(h,i._decor.inactive);this._placeholderDecorations.set(l,u)}}this._placeholderGroups=K2(this._snippet.placeholders,gr.compareByIndex)})}};um._decor={active:Ue.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ue.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ue.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ue.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};var AH={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},tu=class Ns{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=Yt(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof Hi)||c.parent instanceof Zc||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let u=r.offset(c);if(u===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let m=l.charCodeAt(u-1);(m===10||m===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let m=1;m w.get(b1)),p=e.invokeWithinContext(w=>new am(w.get(Qs),u)),f=()=>a,_=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),n,0)),b=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),0,r)),C=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),T=e.getSelections().map((w,A)=>({selection:w,idx:A})).sort((w,A)=>k.compareRangesUsingStarts(w.selection,A.selection));for(let{selection:w,idx:A}of T){let O=Ns.adjustSelection(u,w,n,0),R=Ns.adjustSelection(u,w,0,r);_!==u.getValueInRange(O)&&(O=w),b!==u.getValueInRange(R)&&(R=w);let j=w.setStartPosition(O.startLineNumber,O.startColumn).setEndPosition(R.endLineNumber,R.endColumn),q=new Pr().parse(t,!0,o),_e=j.getStartPosition(),J=Ns.adjustWhitespace(u,_e,s||A>0&&C!==u.getLineFirstNonWhitespaceColumn(w.positionLineNumber),q);q.resolveVariables(new om([p,new lm(f,A,T.length,e.getOption(76)==="spread"),new sm(u,w,A,l),new cm(u,w,c),new Aa,new dm(m),new hm])),d[A]=at.replace(j,q.toString()),d[A].identifier={major:A,minor:0},d[A]._isTracked=!0,h[A]=new um(e,q,J)}return{edits:d,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Pr,h=new Zh,u=new om([e.invokeWithinContext(p=>new am(p.get(Qs),c)),new lm(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new sm(c,e.getSelection(),0,s),new cm(c,e.getSelection(),a),new Aa,new dm(e.invokeWithinContext(p=>p.get(b1))),new hm]);t=t.sort((p,f)=>k.compareRangesUsingStarts(p.range,f.range));let m=0;for(let p=0;p 0){let A=t[p-1].range,O=k.fromPositions(A.getEndPosition(),f.getStartPosition()),R=new Hi(c.getValueInRange(O));h.appendChild(R),m+=R.value.length}let b=d.parseFragment(_,h);Ns.adjustWhitespace(c,f.getStartPosition(),!0,h,new Set(b)),h.resolveVariables(u);let C=h.toString(),T=C.slice(m);m=C.length;let w=at.replace(f,T);w.identifier={major:p,minor:0},w._isTracked=!0,l.push(w)}return d.ensureFinalTabstop(h,n,!0),{edits:l,snippets:[new um(e,h,"")]}}constructor(e,t,n=AH,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){ti(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?Ns.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Ns.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;o ye.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=AH){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=Ns.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l ye.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length {o.push(...r.get(s))})}e.sort(k.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(k.compareRangesUsingStarts);for(let o=0;o 0}};tu=Eee([Tee(3,rt)],tu);var Iee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O4=function(i,e){return function(t,n){e(t,n,i)}},LH={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},ui=class mm{static get(e){return e.getContribution(mm.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new W,this._modelVersionId=-1,this._inSnippet=mm.InSnippetMode.bindTo(r),this._hasNextTabstop=mm.HasNextTabstop.bindTo(r),this._hasPrevTabstop=mm.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?LH:Object.assign(Object.assign({},LH),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():" ")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(ot(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tu(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,s)=>{if(!this._session||o!==this._editor.getModel()||!ie.equals(this._editor.getPosition(),s))return;let{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;let l=o.getValueInRange(a.range),c=!!a.choice.options.find(h=>h.value===l),d=[];for(let h=0;h r.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{kH(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};ui.ID="snippetController2";ui.InSnippetMode=new Ne("inSnippetMode",!1,g("inSnippetMode","Whether the editor in current in snippet mode"));ui.HasNextTabstop=new Ne("hasNextTabstop",!1,g("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));ui.HasPrevTabstop=new Ne("hasPrevTabstop",!1,g("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));ui=Iee([O4(1,Ja),O4(2,le),O4(3,we),O4(4,rt)],ui);Se(ui.ID,ui,4);var P4=ni.bindToContribution(ui.get);ge(new P4({id:"jumpToNextSnippetPlaceholder",precondition:G.and(ui.InSnippetMode,ui.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:2}}));ge(new P4({id:"jumpToPrevSnippetPlaceholder",precondition:G.and(ui.InSnippetMode,ui.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:1026}}));ge(new P4({id:"leaveSnippet",precondition:ui.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:9,secondary:[1033]}}));ge(new P4({id:"acceptSnippet",precondition:ui.InSnippetMode,handler:i=>i.finish()}));Ci();st();var kee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N8=function(i,e){return function(t,n){e(t,n,i)}},iu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},_r;(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(_r||(_r={}));var F4=class extends Y{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,h,u){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(N4,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Lo("isActive",!1),this._forceUpdate=uH("forceUpdate"),this._selectedInlineCompletionId=Lo("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([_r.Redo,_r.Undo,_r.AcceptWord]),this._fetchInlineCompletions=lH("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Yo.Automatic}),handleChange:(p,f)=>(p.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(p.change)?f.preserveCurrentCompletion=!0:p.didChange(this._forceUpdate)&&(f.inlineCompletionTriggerKind=p.change),!0)},(p,f)=>{if(this._forceUpdate.read(p),!(this._enabled.read(p)&&this.selectedSuggestItem.read(p)||this._isActive.read(p))){this._source.cancelUpdate();return}this.textModelVersionId.read(p);let b=this.selectedInlineCompletion.get(),C=f.preserveCurrentCompletion||b!=null&&b.forwardStable?b:void 0,T=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(p);if(T&&!w){let R=this._source.inlineCompletions.get();_i(j=>{R&&T.request.versionId>R.request.versionId&&this._source.inlineCompletions.set(T.clone(),j),this._source.clearSuggestWidgetInlineCompletions(j)})}let A=this.cursorPosition.read(p),O={triggerKind:f.inlineCompletionTriggerKind,selectedSuggestionInfo:w==null?void 0:w.toSelectedSuggestionInfo()};return this._source.fetch(A,O,C)}),this._filteredInlineCompletionItems=gn("filteredInlineCompletionItems",p=>{let f=this._source.inlineCompletions.read(p);if(!f)return[];let _=this.cursorPosition.read(p);return f.inlineCompletions.filter(C=>C.isVisible(this.textModel,_,p))}),this.selectedInlineCompletionIndex=gn("selectedCachedCompletionIndex",p=>{let f=this._selectedInlineCompletionId.read(p),_=this._filteredInlineCompletionItems.read(p),b=this._selectedInlineCompletionId===void 0?-1:_.findIndex(C=>C.semanticId===f);return b===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):b}),this.selectedInlineCompletion=gn("selectedCachedCompletion",p=>{let f=this._filteredInlineCompletionItems.read(p),_=this.selectedInlineCompletionIndex.read(p);return f[_]}),this.lastTriggerKind=this._source.inlineCompletions.map(p=>p==null?void 0:p.request.context.triggerKind),this.inlineCompletionsCount=gn("selectedInlineCompletionsCount",p=>{if(this.lastTriggerKind.read(p)===Yo.Explicit)return this._filteredInlineCompletionItems.read(p).length}),this.state=gn("ghostTextAndCompletion",p=>{var f;let _=this.textModel,b=this.selectedSuggestItem.read(p);if(b){let C=this._source.suggestWidgetInlineCompletions.read(p),T=C?C.inlineCompletions:[this.selectedInlineCompletion.read(p)].filter(uT),w=b.toSingleTextEdit().removeCommonPrefix(_),A=YT(T,Oe=>{let Pe=Oe.toSingleTextEdit(p);return Pe=Pe.removeCommonPrefix(_,k.fromPositions(Pe.range.getStartPosition(),b.range.getEndPosition())),Pe.augments(w)?{edit:Pe,completion:Oe}:void 0});if(!this._suggestPreviewEnabled.read(p)&&!A)return;let R=(f=A==null?void 0:A.edit)!==null&&f!==void 0?f:w,j=A?A.edit.text.length-w.text.length:0,q=this._suggestPreviewMode.read(p),_e=this.cursorPosition.read(p),J=R.computeGhostText(_,q,_e,j);return{ghostText:J!=null?J:new Qh(R.range.endLineNumber,[]),completion:A==null?void 0:A.completion,suggestItem:b}}else{if(!this._isActive.read(p))return;let C=this.selectedInlineCompletion.read(p);if(!C)return;let T=C.toSingleTextEdit(p),w=this._inlineSuggestMode.read(p),A=this.cursorPosition.read(p),O=T.computeGhostText(_,w,A);return O?{ghostText:O,completion:C,suggestItem:void 0}:void 0}}),this.ghostText=gn("ghostText",p=>{let f=this.state.read(p);if(f)return f.ghostText}),this._register(mH(this._fetchInlineCompletions,!0));let m;this._register(vi("call handleItemDidShow",p=>{var f,_;let b=this.state.read(p),C=b==null?void 0:b.completion;if((C==null?void 0:C.semanticId)!==(m==null?void 0:m.semanticId)&&(m=C,C)){let T=C.inlineCompletion,w=T.source;(_=(f=w.provider).handleItemDidShow)===null||_===void 0||_.call(f,w.inlineCompletions,T.sourceInlineCompletion,T.insertText)}}))}trigger(e){return iu(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return iu(this,void 0,void 0,function*(){l8(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,Yo.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){l8(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return iu(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return iu(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(t=this.selectedInlineCompletion.get())===null||t===void 0?void 0:t.toInlineCompletion(void 0);!r||!o||(e.pushUndoStop(),o.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=ui.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,bt)),_i(s=>{this._source.clear(s),this._isActive.set(!1,s)}))})}acceptNextWord(e){this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length {let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})}_acceptNext(e,t){var n;if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(n=this.selectedInlineCompletion.get())===null||n===void 0?void 0:n.toInlineCompletion(void 0);if(!r||!o)return;if(o.snippetInfo||o.filterText!==o.insertText){this.accept(e);return}if(r.parts.length===0)return;let s=r.parts[0],a=new ie(r.lineNumber,s.column),l=s.lines.join(` +`)}withRange(e){return new i(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}};function fee(i,e){let t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new k(i.lineNumber,t.startColumn,i.lineNumber,n):k.fromPositions(i,i.with(void 0,n))}function wH(i,e,t,n){let o=t.getLineContent(e.lineNumber).substring(0,e.column-1)+i,s=t.tokenization.tokenizeLineWithEdit(e,o.length-(e.column-1),i),a=s==null?void 0:s.sliceAndInflate(e.column-1,o.length,0);return a?yH(a,n):i}var gee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EH=function(i,e){return function(t,n){e(t,n,i)}},_ee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},N4=class extends Y{constructor(e,t,n,r,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=r,this.languageConfigurationService=o,this._updateOperation=this._register(new li),this.inlineCompletions=Q0("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=Q0("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var r,o;let s=new x8(e,t,this.textModel.getVersionId()),a=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((r=this._updateOperation.value)===null||r===void 0)&&r.request.satisfies(s))return this._updateOperation.value.promise;if(!((o=a.get())===null||o===void 0)&&o.request.satisfies(s))return Promise.resolve(!0);let l=!!this._updateOperation.value;this._updateOperation.clear();let c=new qt,d=(()=>_ee(this,void 0,void 0,function*(){if((l||t.triggerKind===Yo.Automatic)&&(yield vee(this._debounceValue.get(this.textModel))),c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let m=new Date,p=yield xH(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,c.token,this.languageConfigurationService);if(c.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;let f=new Date;this._debounceValue.update(this.textModel,f.getTime()-m.getTime());let _=new T8(p,s,this.textModel,this.versionId);if(n){let b=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!p.has(b)&&_.prepend(n.inlineCompletion,b.range,!0)}return this._updateOperation.clear(),_i(b=>{a.set(_,b)}),!0}))(),h=new E8(s,c,d);return this._updateOperation.value=h,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};N4=gee([EH(3,le),EH(4,rt)],N4);function vee(i,e){return new Promise(t=>{let n,r=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(r),n&&n.dispose(),t()}))})}var x8=class{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&bee(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===Yo.Automatic||this.context.triggerKind===Yo.Explicit)&&this.versionId===e.versionId}};function bee(i,e,t){return!i||!e?i===e:t(i,e)}var E8=class{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}},T8=class{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,r){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=r,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=gn("ranges",s=>{this.versionId.read(s);let a=!1;for(let l of this._inlineCompletions)a=a||l._updateRange(this.textModel);return a&&this._rangeVersionIdValue++,this._rangeVersionIdValue});let o=n.deltaDecorations([],e.completions.map(s=>({range:s.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((s,a)=>new D4(s,o[a],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[]),this.inlineCompletionProviderResult.dispose();for(let e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();let r=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new D4(e,r,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}},D4=class{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,r){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=r!=null?r:e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){let r=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==r.range.startLineNumber)return!1;let o=e.getValueInRange(r.range,1).toLowerCase(),s=r.text.toLowerCase(),a=Math.max(0,t.column-r.range.startColumn),l=s.substring(0,a),c=s.substring(a),d=o.substring(0,a),h=o.substring(a),u=e.getLineIndentColumn(r.range.startLineNumber);return r.range.startColumn<=u&&(d=d.trimStart(),d.length===0&&(h=h.trimStart()),l=l.trimStart(),l.length===0&&(c=c.trimStart())),l.startsWith(d)&&!!sI(h,c)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Jc(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return TH(this._getUpdatedRange(e)).isBefore(TH(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){let t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}};function TH(i){return i.startLineNumber===i.endLineNumber?new ie(1,1+i.endColumn-i.startColumn):new ie(1+i.endLineNumber-i.startLineNumber,i.endColumn)}re();ii();Me();St();ht();ln();ut();Gt();it();re();ec();ii();wn();St();Ie();Us();be();mi();Ci();qe();ut();var nm=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Le={Visible:i4,HasFocusedSuggestion:new Ne("suggestWidgetHasFocusedSuggestion",!1,g("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Ne("suggestWidgetDetailsVisible",!1,g("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Ne("suggestWidgetMultipleSuggestions",!1,g("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Ne("suggestionMakesTextEdit",!0,g("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Ne("acceptSuggestionOnEnter",!0,g("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Ne("suggestionHasInsertAndReplaceRange",!1,g("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Ne("suggestionInsertMode",void 0,{type:"string",description:g("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Ne("suggestionCanResolve",!1,g("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ls=new ae("suggestWidgetStatusBar"),I8=class{constructor(e,t,n,r){var o;this.position=e,this.completion=t,this.container=n,this.provider=r,this.isInvalid=!1,this.score=Vs.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,k.isIRange(t.range)?(this.editStart=new ie(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ie(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ie(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ie(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ie(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return nm(this,void 0,void 0,function*(){if(!this._resolveCache){let t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,t.dispose()},n=>{Wr(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}},ka=class{constructor(e=2,t=new Set,n=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=r,this.showDeprecated=o}};ka.default=new ka;var eu;function IH(){return eu}var k8=class{constructor(e,t,n,r){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=r}};function rm(i,e,t,n=ka.default,r={triggerKind:0},o=ze.None){return nm(this,void 0,void 0,function*(){let s=new Cn(!0);t=t.clone();let a=e.getWordAtPosition(t),l=a?new k(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):k.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},d=[],h=new W,u=[],m=!1,p=(_,b,C)=>{var T,w,A;let O=!1;if(!b)return O;for(let R of b.suggestions)if(!n.kindFilter.has(R.kind)){if(!n.showDeprecated&&(!((T=R==null?void 0:R.tags)===null||T===void 0)&&T.includes(1)))continue;R.range||(R.range=c),R.sortText||(R.sortText=typeof R.label=="string"?R.label:R.label.label),!m&&R.insertTextRules&&R.insertTextRules&4&&(m=Pr.guessNeedsClipboard(R.insertText)),d.push(new I8(t,R,b,_)),O=!0}return tf(b)&&h.add(b),u.push({providerName:(w=_._debugDisplayName)!==null&&w!==void 0?w:"unknown_provider",elapsedProvider:(A=b.duration)!==null&&A!==void 0?A:-1,elapsedOverall:C.elapsed()}),O},f=(()=>nm(this,void 0,void 0,function*(){if(!eu||n.kindFilter.has(27))return;let _=n.providerItemsToReuse.get(eu);if(_){_.forEach(T=>d.push(T));return}if(n.providerFilter.size>0&&!n.providerFilter.has(eu))return;let b=new Cn(!0),C=yield eu.provideCompletionItems(e,t,r,o);p(eu,C,b)}))();for(let _ of i.orderedGroups(e)){let b=!1;if(yield Promise.all(_.map(C=>nm(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(C)){let T=n.providerItemsToReuse.get(C);T.forEach(w=>d.push(w)),b=b||T.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(C)))try{let T=new Cn(!0),w=yield C.provideCompletionItems(e,t,r,o);b=p(C,w,T)||b}catch(T){bt(T)}}))),b||o.isCancellationRequested)break}return yield f,o.isCancellationRequested?(h.dispose(),Promise.reject(new Zp)):new k8(d.sort(Cee(n.snippetSortOrder)),m,{entries:u,elapsed:s.elapsed()},h)})}function A8(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLow e.sortTextLow)return 1}return i.textLabel e.textLabel?1:i.completion.kind-e.completion.kind}function yee(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return A8(i,e)}function See(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return A8(i,e)}var R4=new Map;R4.set(0,yee);R4.set(2,See);R4.set(1,A8);function Cee(i){return R4.get(i)}Je.registerCommand("_executeCompletionItemProvider",(i,...e)=>nm(void 0,void 0,void 0,function*(){let[t,n,r,o]=e;ot(Qe.isUri(t)),ot(ie.isIPosition(n)),ot(typeof r=="string"||!r),ot(typeof o=="number"||!o);let{completionProvider:s}=i.get(le),a=yield i.get(Ki).createModelReference(t);try{let l={incomplete:!1,suggestions:[]},c=[],d=a.object.textEditorModel.validatePosition(n),h=yield rm(s,a.object.textEditorModel,d,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(let u of h.items)c.length<(o!=null?o:0)&&c.push(u.resolve(ze.None)),l.incomplete=l.incomplete||u.container.incomplete,l.suggestions.push(u.completion);try{return yield Promise.all(c),l}finally{setTimeout(()=>h.disposable.dispose(),100)}}finally{a.dispose()}}));function kH(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}var As=class{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}};be();qe();ff();Dt();re();Bt();Zo();Ie();Mi();ln();hn();YW();Sn();function L8(i,e=Hd){return hI(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}_T();Tr();Bt();var M4=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let i;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?i=crypto.getRandomValues.bind(crypto):i=function(n){for(let r=0;r =0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},xee=function(i,e){return function(t,n){e(t,n,i)}},VCe=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0}),om=class{constructor(e){this._delegates=e}resolve(e){for(let t of this._delegates){let n=t.resolve(e);if(n!==void 0)return n}}},sm=class{constructor(e,t,n,r){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=r}resolve(e){let{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,r=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){let o=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);o&&(n=o.value,r=o.multiline)}if(n&&r&&e.snippet){let o=this._model.getLineContent(this._selection.startLineNumber),s=Yt(o,0,this._selection.startColumn-1),a=s;e.snippet.walk(c=>c===e?!1:(c instanceof Hi&&(a=Yt(nc(c.value).pop())),!0));let l=Xa(a,s);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,d,h)=>`${d}${a.substr(l)}${h}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){let n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}},am=class{constructor(e,t){this._labelService=e,this._model=t}resolve(e){let{name:t}=e;if(t==="TM_FILENAME")return Bd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){let n=Bd(this._model.uri.fsPath),r=n.lastIndexOf(".");return r<=0?n:n.slice(0,r)}else{if(t==="TM_DIRECTORY")return gT(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(Gd(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}},lm=class{constructor(e,t,n,r){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=r}resolve(e){if(e.name!=="CLIPBOARD")return;let t=this._readClipboardText();if(t){if(this._spread){let n=t.split(/\r\n|\n|\r/).filter(r=>!kT(r));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}},cm=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){let{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),r=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(r){if(t==="LINE_COMMENT")return r.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return r.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return r.blockCommentEndToken||void 0}}};cm=wee([xee(2,rt)],cm);var Aa=class i{constructor(){this._date=new Date}resolve(e){let{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return i.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return i.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return i.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return i.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){let n=this._date.getTimezoneOffset(),r=n>0?"-":"+",o=Math.trunc(Math.abs(n/60)),s=o<10?"0"+o:o,a=Math.abs(n)-o*60,l=a<10?"0"+a:a;return r+s+":"+l}}};Aa.dayNames=[g("Sunday","Sunday"),g("Monday","Monday"),g("Tuesday","Tuesday"),g("Wednesday","Wednesday"),g("Thursday","Thursday"),g("Friday","Friday"),g("Saturday","Saturday")];Aa.dayNamesShort=[g("SundayShort","Sun"),g("MondayShort","Mon"),g("TuesdayShort","Tue"),g("WednesdayShort","Wed"),g("ThursdayShort","Thu"),g("FridayShort","Fri"),g("SaturdayShort","Sat")];Aa.monthNames=[g("January","January"),g("February","February"),g("March","March"),g("April","April"),g("May","May"),g("June","June"),g("July","July"),g("August","August"),g("September","September"),g("October","October"),g("November","November"),g("December","December")];Aa.monthNamesShort=[g("JanuaryShort","Jan"),g("FebruaryShort","Feb"),g("MarchShort","Mar"),g("AprilShort","Apr"),g("MayShort","May"),g("JuneShort","Jun"),g("JulyShort","Jul"),g("AugustShort","Aug"),g("SeptemberShort","Sep"),g("OctoberShort","Oct"),g("NovemberShort","Nov"),g("DecemberShort","Dec")];var dm=class{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;let t=Nk(this._workspaceService.getWorkspace());if(!Lk(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(s9(e))return Bd(e.uri.path);let t=Bd(e.configPath.path);return t.endsWith(a9)&&(t=t.substr(0,t.length-a9.length-1)),t}_resoveWorkspacePath(e){if(s9(e))return L8(e.uri.fsPath);let t=Bd(e.configPath.path),n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?L8(n):"/"}},hm=class{resolve(e){let{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return M4()}};var Eee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Tee=function(i,e){return function(t,n){e(t,n,i)}},um=class i{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=K2(t.placeholders,gr.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;let e=this._editor.getModel();this._editor.changeDecorations(t=>{for(let n of this._snippet.placeholders){let r=this._snippet.offset(n),o=this._snippet.fullLen(n),s=k.fromPositions(e.getPositionAt(this._offset+r),e.getPositionAt(this._offset+r+o)),a=n.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive,l=t.addDecoration(s,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let r=[];for(let o of this._placeholderGroups[this._placeholderGroupsIdx])if(o.transform){let s=this._placeholderDecorations.get(o),a=this._editor.getModel().getDecorationRange(s),l=this._editor.getModel().getValueInRange(a),c=o.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d 0&&this._editor.executeEdits("snippet.placeholderTransform",r)}let t=!1;e===!0&&this._placeholderGroupsIdx 0&&(this._placeholderGroupsIdx-=1,t=!0);let n=this._editor.getModel().changeDecorations(r=>{let o=new Set,s=[];for(let a of this._placeholderGroups[this._placeholderGroupsIdx]){let l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);s.push(new ye(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(a);for(let d of this._snippet.enclosingPlaceholders(a)){let h=this._placeholderDecorations.get(d);r.changeDecorationOptions(h,d.isFinalTabstop?i._decor.activeFinal:i._decor.active),o.add(d)}}for(let[a,l]of this._placeholderDecorations)o.has(a)||r.changeDecorationOptions(l,a.isFinalTabstop?i._decor.inactiveFinal:i._decor.inactive);return s});return t?this.move(e):n!=null?n:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof gr){let n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){let[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){let e=new Map;for(let t of this._placeholderGroups){let n;for(let r of t){if(r.isFinalTabstop)break;n||(n=[],e.set(r.index,n));let o=this._placeholderDecorations.get(r),s=this._editor.getModel().getDecorationRange(o);if(!s){e.delete(r.index);break}n.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;let e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;let t=this._placeholderDecorations.get(e);if(!t)return;let n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof Zc,!e)),e}merge(e){let t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(let r of this._placeholderGroups[this._placeholderGroupsIdx]){let o=e.shift();console.assert(o._offset!==-1),console.assert(!o._placeholderDecorations);let s=o._snippet.placeholderInfo.last.index;for(let l of o._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=r.index+(s+1)/this._nestingLevel:l.index=r.index+l.index/this._nestingLevel;this._snippet.replace(r,o._snippet.children);let a=this._placeholderDecorations.get(r);n.removeDecoration(a),this._placeholderDecorations.delete(r);for(let l of o._snippet.placeholders){let c=o._snippet.offset(l),d=o._snippet.fullLen(l),h=k.fromPositions(t.getPositionAt(o._offset+c),t.getPositionAt(o._offset+c+d)),u=n.addDecoration(h,i._decor.inactive);this._placeholderDecorations.set(l,u)}}this._placeholderGroups=K2(this._snippet.placeholders,gr.compareByIndex)})}};um._decor={active:Ue.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ue.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ue.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ue.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};var AH={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},tu=class Ns{static adjustWhitespace(e,t,n,r,o){let s=e.getLineContent(t.lineNumber),a=Yt(s,0,t.column-1),l;return r.walk(c=>{if(!(c instanceof Hi)||c.parent instanceof Zc||o&&!o.has(c))return!0;let d=c.value.split(/\r\n|\r|\n/);if(n){let u=r.offset(c);if(u===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:r.toString();let m=l.charCodeAt(u-1);(m===10||m===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let m=1;m w.get(b1)),p=e.invokeWithinContext(w=>new am(w.get(Qs),u)),f=()=>a,_=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),n,0)),b=u.getValueInRange(Ns.adjustSelection(u,e.getSelection(),0,r)),C=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),T=e.getSelections().map((w,A)=>({selection:w,idx:A})).sort((w,A)=>k.compareRangesUsingStarts(w.selection,A.selection));for(let{selection:w,idx:A}of T){let O=Ns.adjustSelection(u,w,n,0),R=Ns.adjustSelection(u,w,0,r);_!==u.getValueInRange(O)&&(O=w),b!==u.getValueInRange(R)&&(R=w);let j=w.setStartPosition(O.startLineNumber,O.startColumn).setEndPosition(R.endLineNumber,R.endColumn),q=new Pr().parse(t,!0,o),_e=j.getStartPosition(),J=Ns.adjustWhitespace(u,_e,s||A>0&&C!==u.getLineFirstNonWhitespaceColumn(w.positionLineNumber),q);q.resolveVariables(new om([p,new lm(f,A,T.length,e.getOption(76)==="spread"),new sm(u,w,A,l),new cm(u,w,c),new Aa,new dm(m),new hm])),d[A]=at.replace(j,q.toString()),d[A].identifier={major:A,minor:0},d[A]._isTracked=!0,h[A]=new um(e,q,J)}return{edits:d,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,n,r,o,s,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};let l=[],c=e.getModel(),d=new Pr,h=new Zh,u=new om([e.invokeWithinContext(p=>new am(p.get(Qs),c)),new lm(()=>o,0,e.getSelections().length,e.getOption(76)==="spread"),new sm(c,e.getSelection(),0,s),new cm(c,e.getSelection(),a),new Aa,new dm(e.invokeWithinContext(p=>p.get(b1))),new hm]);t=t.sort((p,f)=>k.compareRangesUsingStarts(p.range,f.range));let m=0;for(let p=0;p 0){let A=t[p-1].range,O=k.fromPositions(A.getEndPosition(),f.getStartPosition()),R=new Hi(c.getValueInRange(O));h.appendChild(R),m+=R.value.length}let b=d.parseFragment(_,h);Ns.adjustWhitespace(c,f.getStartPosition(),!0,h,new Set(b)),h.resolveVariables(u);let C=h.toString(),T=C.slice(m);m=C.length;let w=at.replace(f,T);w.identifier={major:p,minor:0},w._isTracked=!0,l.push(w)}return d.ensureFinalTabstop(h,n,!0),{edits:l,snippets:[new um(e,h,"")]}}constructor(e,t,n=AH,r){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=r,this._templateMerges=[],this._snippets=[]}dispose(){ti(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;let{edits:e,snippets:t}=typeof this._template=="string"?Ns.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):Ns.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{let r=n.filter(o=>!!o.identifier);for(let o=0;o ye.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=AH){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);let{edits:n,snippets:r}=Ns.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,o=>{let s=o.filter(l=>!!l.identifier);for(let l=0;l ye.fromPositions(l.range.getEndPosition()))})}next(){let e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){let e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){let t=[];for(let n of this._snippets){let r=n.move(e);t.push(...r)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;let e=this._editor.getSelections();if(e.length {o.push(...r.get(s))})}e.sort(k.compareRangesUsingStarts);for(let[n,r]of t){if(r.length!==e.length){t.delete(n);continue}r.sort(k.compareRangesUsingStarts);for(let o=0;o 0}};tu=Eee([Tee(3,rt)],tu);var Iee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O4=function(i,e){return function(t,n){e(t,n,i)}},LH={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},ui=class mm{static get(e){return e.getContribution(mm.ID)}constructor(e,t,n,r,o){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new W,this._modelVersionId=-1,this._inSnippet=mm.InSnippetMode.bindTo(r),this._hasNextTabstop=mm.HasNextTabstop.bindTo(r),this._hasPrevTabstop=mm.HasPrevTabstop.bindTo(r)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?LH:Object.assign(Object.assign({},LH),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():" ")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(ot(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tu(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(o,s)=>{if(!this._session||o!==this._editor.getModel()||!ie.equals(this._editor.getPosition(),s))return;let{activeChoice:a}=this._session;if(!a||a.choice.options.length===0)return;let l=o.getValueInRange(a.range),c=!!a.choice.options.find(h=>h.value===l),d=[];for(let h=0;h r.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}let{activeChoice:e}=this._session;if(!e||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,queueMicrotask(()=>{kH(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};ui.ID="snippetController2";ui.InSnippetMode=new Ne("inSnippetMode",!1,g("inSnippetMode","Whether the editor in current in snippet mode"));ui.HasNextTabstop=new Ne("hasNextTabstop",!1,g("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));ui.HasPrevTabstop=new Ne("hasPrevTabstop",!1,g("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));ui=Iee([O4(1,Ja),O4(2,le),O4(3,we),O4(4,rt)],ui);Se(ui.ID,ui,4);var P4=ni.bindToContribution(ui.get);ge(new P4({id:"jumpToNextSnippetPlaceholder",precondition:$.and(ui.InSnippetMode,ui.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:2}}));ge(new P4({id:"jumpToPrevSnippetPlaceholder",precondition:$.and(ui.InSnippetMode,ui.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:1026}}));ge(new P4({id:"leaveSnippet",precondition:ui.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:100+30,kbExpr:I.editorTextFocus,primary:9,secondary:[1033]}}));ge(new P4({id:"acceptSnippet",precondition:ui.InSnippetMode,handler:i=>i.finish()}));Ci();st();var kee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N8=function(i,e){return function(t,n){e(t,n,i)}},iu=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},_r;(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(_r||(_r={}));var F4=class extends Y{get isAcceptingPartially(){return this._isAcceptingPartially}get isNavigatingCurrentInlineCompletion(){return this._isNavigatingCurrentInlineCompletion}constructor(e,t,n,r,o,s,a,l,c,d,h,u){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=r,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(N4,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=Lo("isActive",!1),this._forceUpdate=uH("forceUpdate"),this._selectedInlineCompletionId=Lo("selectedInlineCompletionId",void 0),this._isAcceptingPartially=!1,this._isNavigatingCurrentInlineCompletion=!1,this._preserveCurrentCompletionReasons=new Set([_r.Redo,_r.Undo,_r.AcceptWord]),this._fetchInlineCompletions=lH("fetch inline completions",{createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:Yo.Automatic}),handleChange:(p,f)=>(p.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(p.change)?f.preserveCurrentCompletion=!0:p.didChange(this._forceUpdate)&&(f.inlineCompletionTriggerKind=p.change),!0)},(p,f)=>{if(this._forceUpdate.read(p),!(this._enabled.read(p)&&this.selectedSuggestItem.read(p)||this._isActive.read(p))){this._source.cancelUpdate();return}this.textModelVersionId.read(p);let b=this.selectedInlineCompletion.get(),C=f.preserveCurrentCompletion||b!=null&&b.forwardStable?b:void 0,T=this._source.suggestWidgetInlineCompletions.get(),w=this.selectedSuggestItem.read(p);if(T&&!w){let R=this._source.inlineCompletions.get();_i(j=>{R&&T.request.versionId>R.request.versionId&&this._source.inlineCompletions.set(T.clone(),j),this._source.clearSuggestWidgetInlineCompletions(j)})}let A=this.cursorPosition.read(p),O={triggerKind:f.inlineCompletionTriggerKind,selectedSuggestionInfo:w==null?void 0:w.toSelectedSuggestionInfo()};return this._source.fetch(A,O,C)}),this._filteredInlineCompletionItems=gn("filteredInlineCompletionItems",p=>{let f=this._source.inlineCompletions.read(p);if(!f)return[];let _=this.cursorPosition.read(p);return f.inlineCompletions.filter(C=>C.isVisible(this.textModel,_,p))}),this.selectedInlineCompletionIndex=gn("selectedCachedCompletionIndex",p=>{let f=this._selectedInlineCompletionId.read(p),_=this._filteredInlineCompletionItems.read(p),b=this._selectedInlineCompletionId===void 0?-1:_.findIndex(C=>C.semanticId===f);return b===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):b}),this.selectedInlineCompletion=gn("selectedCachedCompletion",p=>{let f=this._filteredInlineCompletionItems.read(p),_=this.selectedInlineCompletionIndex.read(p);return f[_]}),this.lastTriggerKind=this._source.inlineCompletions.map(p=>p==null?void 0:p.request.context.triggerKind),this.inlineCompletionsCount=gn("selectedInlineCompletionsCount",p=>{if(this.lastTriggerKind.read(p)===Yo.Explicit)return this._filteredInlineCompletionItems.read(p).length}),this.state=gn("ghostTextAndCompletion",p=>{var f;let _=this.textModel,b=this.selectedSuggestItem.read(p);if(b){let C=this._source.suggestWidgetInlineCompletions.read(p),T=C?C.inlineCompletions:[this.selectedInlineCompletion.read(p)].filter(uT),w=b.toSingleTextEdit().removeCommonPrefix(_),A=YT(T,Oe=>{let Pe=Oe.toSingleTextEdit(p);return Pe=Pe.removeCommonPrefix(_,k.fromPositions(Pe.range.getStartPosition(),b.range.getEndPosition())),Pe.augments(w)?{edit:Pe,completion:Oe}:void 0});if(!this._suggestPreviewEnabled.read(p)&&!A)return;let R=(f=A==null?void 0:A.edit)!==null&&f!==void 0?f:w,j=A?A.edit.text.length-w.text.length:0,q=this._suggestPreviewMode.read(p),_e=this.cursorPosition.read(p),J=R.computeGhostText(_,q,_e,j);return{ghostText:J!=null?J:new Qh(R.range.endLineNumber,[]),completion:A==null?void 0:A.completion,suggestItem:b}}else{if(!this._isActive.read(p))return;let C=this.selectedInlineCompletion.read(p);if(!C)return;let T=C.toSingleTextEdit(p),w=this._inlineSuggestMode.read(p),A=this.cursorPosition.read(p),O=T.computeGhostText(_,w,A);return O?{ghostText:O,completion:C,suggestItem:void 0}:void 0}}),this.ghostText=gn("ghostText",p=>{let f=this.state.read(p);if(f)return f.ghostText}),this._register(mH(this._fetchInlineCompletions,!0));let m;this._register(vi("call handleItemDidShow",p=>{var f,_;let b=this.state.read(p),C=b==null?void 0:b.completion;if((C==null?void 0:C.semanticId)!==(m==null?void 0:m.semanticId)&&(m=C,C)){let T=C.inlineCompletion,w=T.source;(_=(f=w.provider).handleItemDidShow)===null||_===void 0||_.call(f,w.inlineCompletions,T.sourceInlineCompletion,T.insertText)}}))}trigger(e){return iu(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return iu(this,void 0,void 0,function*(){l8(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,Yo.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){l8(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_deltaSelectedInlineCompletionIndex(e){return iu(this,void 0,void 0,function*(){yield this.triggerExplicitly(),this._isNavigatingCurrentInlineCompletion=!0;try{let t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){let n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}finally{this._isNavigatingCurrentInlineCompletion=!1}})}next(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return iu(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t,n;return iu(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(t=this.selectedInlineCompletion.get())===null||t===void 0?void 0:t.toInlineCompletion(void 0);!r||!o||(e.pushUndoStop(),o.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,""),...o.additionalTextEdits]),e.setPosition(o.snippetInfo.range.getStartPosition()),(n=ui.get(e))===null||n===void 0||n.insert(o.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[at.replaceMove(o.range,o.insertText),...o.additionalTextEdits]),o.command&&(yield this._commandService.executeCommand(o.command.id,...o.command.arguments||[]).then(void 0,bt)),_i(s=>{this._source.clear(s),this._isActive.set(!1,s)}))})}acceptNextWord(e){this._acceptNext(e,(t,n)=>{let r=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),o=this._languageConfigurationService.getLanguageConfiguration(r),s=new RegExp(o.wordDefinition.source,o.wordDefinition.flags.replace("g","")),a=n.match(s),l=0;a&&a.index!==void 0?a.index===0?l=a[0].length:l=a.index:l=n.length;let d=/\s+/g.exec(n);return d&&d.index!==void 0&&d.index+d[0].length {let r=n.match(/\n/);return r&&r.index!==void 0?r.index+1:n.length})}_acceptNext(e,t){var n;if(e.getModel()!==this.textModel)throw new Zl;let r=this.ghostText.get(),o=(n=this.selectedInlineCompletion.get())===null||n===void 0?void 0:n.toInlineCompletion(void 0);if(!r||!o)return;if(o.snippetInfo||o.filterText!==o.insertText){this.accept(e);return}if(r.parts.length===0)return;let s=r.parts[0],a=new ie(r.lineNumber,s.column),l=s.lines.join(` `),c=t(a,l);if(c===l.length&&r.parts.length===1){this.accept(e);return}let d=l.substring(0,c);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[at.replace(k.fromPositions(a),d)]);let h=Z0(d);e.setPosition(J0(a,h))}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){let h=k.fromPositions(o.range.getStartPosition(),J0(a,Z0(d))),u=e.getModel().getValueInRange(h,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,u.length)}}};F4=kee([N8(9,Ce),N8(10,Pt),N8(11,rt)],F4);wt();re();St();Ie();dn();wr();Dt();ct();Gt();it();wt();WW();re();Sn();ec();ii();c9();Me();Zo();St();Ie();ht();ct();re();dn();an();ac();st();var Aee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NH=function(i,e){return function(t,n){e(t,n,i)}},pm=class{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;let r=n[0].score[0];for(let o=0;o l&&h.type===n[c].completion.kind&&h.insertText===n[c].completion.insertText&&(l=h.touch,a=c),n[c].completion.preselect&&s===-1)return s=c}return a!==-1?a:s!==-1?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(let[n,r]of e)r.touch=t,r.type=typeof r.type=="number"?r.type:u1.fromString(r.type),this._cache.set(n,r);this._seq=this._cache.size}},R8=class extends pm{constructor(){super("recentlyUsedByPrefix"),this._trie=Ak.forStrings(),this._seq=0}memorize(e,t,n){let{word:r}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${r}`;this._trie.set(o,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){let{word:r}=e.getWordUntilPosition(t);if(!r)return super.select(e,t,n);let o=`${e.getLanguageId()}/${r}`,s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let a=0;a e.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(let[t,n]of e)n.type=typeof n.type=="number"?n.type:u1.fromString(n.type),this._trie.set(t,n)}}},fm=class H4{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new W,this._persistSoon=new kt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===Bk.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;let r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==r){this._saveState();let o=H4._strategyCtors.get(r)||B4;this._strategy=new o;try{let a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${H4._storagePrefix}/${r}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch(s){}}return this._strategy}_saveState(){if(this._strategy){let t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${H4._storagePrefix}/${this._strategy.name}`,n,t,1)}}};fm._strategyCtors=new Map([["recentlyUsedByPrefix",R8],["recentlyUsed",D8],["first",B4]]);fm._storagePrefix="suggest/memories";fm=Aee([NH(0,Ar),NH(1,nt)],fm);var nu=Zn("ISuggestMemories");ir(nu,fm,1);qe();var Lee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Nee=function(i,e){return function(t,n){e(t,n,i)}},ru=class DH{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=DH.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(119)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){let e=this._editor.getOption(119)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){let t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}let n=this._editor.getModel(),r=this._editor.getSelection(),o=n.getWordAtPosition(r.getStartPosition());if(!o){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(o.endColumn===r.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};ru.AtEnd=new Ne("atEndOfWord",!1);ru=Lee([Nee(1,we)],ru);be();Ci();qe();st();ff();qe();var Dee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Ree=function(i,e){return function(t,n){e(t,n,i)}},Nl=class z4{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=z4.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(z4._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let r=n;for(let o=t.items.length;o>0&&(r=(r+t.items.length+(e?1:-1))%t.items.length,!(r===n||!t.items[r].completion.additionalTextEdits));o--);return r}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=z4._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Nl.OtherSuggestions=new Ne("hasOtherSuggestions",!1);Nl=Dee([Ree(1,we)],Nl);Dt();re();V2();var U4=class{constructor(e,t,n,r){this._disposables=new W,this._disposables.add(n.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(o=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(o=>{if(this._active&&!t.isFrozen()&&n.state!==0){let s=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&r(this._active.item)}}))}_onItem(e){if(!e||!Xt(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;let t=new oc;for(let n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}};ct();Gt();it();wt();re();Bt();Mi();Qf();Dt();Ie();rT();St();Ie();var Mee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Dl=class i{provideSelectionRanges(e,t){return Mee(this,void 0,void 0,function*(){let n=[];for(let r of t){let o=[];n.push(o);let s=new Map;yield new Promise(a=>i._bracketsRightYield(a,0,e,r,s)),yield new Promise(a=>i._bracketsLeftYield(a,0,e,r,s,o))}return n})}static _bracketsRightYield(e,t,n,r,o){let s=new Map,a=Date.now();for(;;){if(t>=i._maxRounds){e();break}if(!r){e();break}let l=n.bracketPairs.findNextBracket(r);if(!l){e();break}if(Date.now()-a>i._maxDuration){setTimeout(()=>i._bracketsRightYield(e,t+1,n,r,o));break}if(l.bracketInfo.isOpeningBracket){let d=l.bracketInfo.bracketText,h=s.has(d)?s.get(d):0;s.set(d,h+1)}else{let d=l.bracketInfo.getOpeningBrackets()[0].bracketText,h=s.has(d)?s.get(d):0;if(h-=1,s.set(d,Math.max(0,h)),h<0){let u=o.get(d);u||(u=new nf,o.set(d,u)),u.push(l.range)}}r=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,r,o,s){let a=new Map,l=Date.now();for(;;){if(t>=i._maxRounds&&o.size===0){e();break}if(!r){e();break}let c=n.bracketPairs.findPrevBracket(r);if(!c){e();break}if(Date.now()-l>i._maxDuration){setTimeout(()=>i._bracketsLeftYield(e,t+1,n,r,o,s));break}if(c.bracketInfo.isOpeningBracket){let h=c.bracketInfo.bracketText,u=a.has(h)?a.get(h):0;if(u-=1,a.set(h,Math.max(0,u)),u<0){let m=o.get(h);if(m){let p=m.shift();m.size===0&&o.delete(h);let f=k.fromPositions(c.range.getEndPosition(),p.getStartPosition()),_=k.fromPositions(c.range.getStartPosition(),p.getEndPosition());s.push({range:f}),s.push({range:_}),i._addBracketLeading(n,_,s)}}}else{let h=c.bracketInfo.getOpeningBrackets()[0].bracketText,u=a.has(h)?a.get(h):0;a.set(h,u+1)}r=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;let r=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(r);o!==0&&o!==t.startColumn&&(n.push({range:k.fromPositions(new ie(r,o),t.getEndPosition())}),n.push({range:k.fromPositions(new ie(r,1),t.getEndPosition())}));let s=r-1;if(s>0){let a=e.getLineFirstNonWhitespaceColumn(s);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(s)&&(n.push({range:k.fromPositions(new ie(s,a),t.getEndPosition())}),n.push({range:k.fromPositions(new ie(s,1),t.getEndPosition())}))}}};Dl._maxDuration=30;Dl._maxRounds=2;var Oee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Rl=class i{static create(e,t){return Oee(this,void 0,void 0,function*(){if(!t.getOption(114).localityBonus||!t.hasModel())return i.None;let n=t.getModel(),r=t.getPosition();if(!e.canComputeWordRanges(n.uri))return i.None;let[o]=yield new Dl().provideSelectionRanges(n,[r]);if(o.length===0)return i.None;let s=yield e.computeWordRanges(n.uri,o[0].range);if(!s)return i.None;let a=n.getWordUntilPosition(r);return delete s[a.word],new class extends i{distance(l,c){if(!r.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,h=s[d];if(GT(h))return 2<<20;let u=sc(h,k.fromPositions(l),k.compareRangesUsingStarts),m=u>=0?h[u]:h[Math.max(0,~u-1)],p=o.length;for(let f of o){if(!k.containsRange(f.range,m))break;p-=1}return p}}})}};Rl.None=new class extends Rl{distance(){return 0}};an();qe();ff();Qa();Dt();Bt();var gm=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}},ou=class i{constructor(e,t,n,r,o,s,a=Tf.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=i._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=r,this._options=o,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,s==="top"?this._snippetCompareFn=i._compareCompletionItemsSnippetsUp:s==="bottom"&&(this._snippetCompareFn=i._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta 0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;let e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext,r="",o="",s=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||s.length>2e3?If:cI;for(let c=0;c =m)d.score=Vs.Default;else if(typeof d.completion.filterText=="string"){let f=l(r,o,p,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!f)continue;NT(d.completion.filterText,d.textLabel)===0?d.score=f:(d.score=lI(r,o,p,d.textLabel,d.labelLow,0),d.score[0]=f[0])}else{let f=l(r,o,p,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!f)continue;d.score=f}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?qT(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0] t.distance?1:e.idx t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return i._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return i._compareCompletionItems(e,t)}};ut();ii();var Pee=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ed=function(i,e){return function(t,n){e(t,n,i)}},Fee=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(h){s(h)}}function l(d){try{c(n.throw(d))}catch(h){s(h)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},La=class{static shouldAutoTrigger(e){if(!e.hasModel())return!1;let t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);let r=t.getWordAtPosition(n);return!(!r||r.endColumn!==n.column&&r.startColumn+1!==n.column||!isNaN(Number(r.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}};function Hee(i,e,t){if(!e.getContextKeyValue(Di.inlineSuggestionVisible.key))return!0;let n=e.getContextKeyValue(Di.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}function Bee(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;let n=e.getContextKeyValue(Di.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(60).suppressSuggestions}var W4=class RH{constructor(e,t,n,r,o,s,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=r,this._logService=o,this._contextKeyService=s,this._configurationService=a,this._languageFeaturesService=l,this._toDispose=new W,this._triggerCharacterListener=new W,this._triggerQuickSuggest=new jo,this._triggerState=void 0,this._completionDisposables=new W,this._onDidCancel=new De,this._onDidTrigger=new De,this._onDidSuggest=new De,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new ye(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){ti(this._triggerCharacterListener),ti([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(88)||!this._editor.hasModel()||!this._editor.getOption(117))return;let e=new Map;for(let n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(let r of n.triggerCharacters||[]){let o=e.get(r);o||(o=new Set,o.add(IH()),e.set(r,o)),o.add(n)}let t=n=>{var r;if(!Bee(this._editor,this._contextKeyService,this._configurationService)||La.shouldAutoTrigger(this._editor))return;if(!n){let a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let o="";MT(n.charCodeAt(n.length-1))?RT(n.charCodeAt(n.length-2))&&(o=n.substr(n.length-2)):o=n.charAt(n.length-1);let s=e.get(o);if(s){let a=new Map;if(this._completionModel)for(let[l,c]of this._completionModel.getItemsByProvider())s.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:o,retrigger:!!this._completionModel,clipboardText:(r=this._completionModel)===null||r===void 0?void 0:r.clipboardText,completionOptions:{providerFilter:s,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;let t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;As.isAllOff(this._editor.getOption(86))||this._editor.getOption(114).snippetsPreventQuickSuggestions&&(!((e=ui.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!La.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;let t=this._editor.getModel(),n=this._editor.getPosition(),r=this._editor.getOption(86);if(!As.isAllOff(r)){if(!As.isAllOn(r)){t.tokenization.tokenizeIfCheap(n.lineNumber);let o=t.tokenization.getLineTokens(n.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(As.valueFor(r,s)!=="on")return}Hee(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(87)))}_refilterCompletionItems(){ot(this._editor.hasModel()),ot(this._triggerState!==void 0);let e=this._editor.getModel(),t=this._editor.getPosition(),n=new La(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,r,o,s,a;if(!this._editor.hasModel())return;let l=this._editor.getModel(),c=new La(l,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=c;let d={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new qt;let h=this._editor.getOption(108),u=1;switch(h){case"top":u=0;break;case"bottom":u=2;break}let{itemKind:m,showDeprecated:p}=RH._createSuggestFilter(this._editor),f=new ka(u,(o=(r=e.completionOptions)===null||r===void 0?void 0:r.kindFilter)!==null&&o!==void 0?o:m,(s=e.completionOptions)===null||s===void 0?void 0:s.providerFilter,(a=e.completionOptions)===null||a===void 0?void 0:a.providerItemsToReuse,p),_=Rl.create(this._editorWorkerService,this._editor),b=rm(this._languageFeaturesService.completionProvider,l,this._editor.getPosition(),f,d,this._requestToken.token);Promise.all([b,_]).then(([C,T])=>Fee(this,void 0,void 0,function*(){var w;if((w=this._requestToken)===null||w===void 0||w.dispose(),!this._editor.hasModel())return;let A=e==null?void 0:e.clipboardText;if(!A&&C.needsClipboard&&(A=yield this._clipboardService.readText()),this._triggerState===void 0)return;let O=this._editor.getModel(),R=new La(O,this._editor.getPosition(),e),j=Object.assign(Object.assign({},Tf.default),{firstMatchCanBeWeak:!this._editor.getOption(114).matchOnWordStartOnly});this._completionModel=new ou(C.items,this._context.column,{leadingLineContent:R.leadingLineContent,characterCountDelta:R.column-this._context.column},T,this._editor.getOption(114),this._editor.getOption(108),j,A),this._completionDisposables.add(C.disposable),this._onNewContext(R),this._reportDurationsTelemetry(C.durations)})).catch(Be)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){let t=new Set;e.getOption(108)==="none"&&t.add(27);let r=e.getOption(114);return r.showMethods||t.add(0),r.showFunctions||t.add(1),r.showConstructors||t.add(2),r.showFields||t.add(3),r.showVariables||t.add(4),r.showClasses||t.add(5),r.showStructs||t.add(6),r.showInterfaces||t.add(7),r.showModules||t.add(8),r.showProperties||t.add(9),r.showEvents||t.add(10),r.showOperators||t.add(11),r.showUnits||t.add(12),r.showValues||t.add(13),r.showConstants||t.add(14),r.showEnums||t.add(15),r.showEnumMembers||t.add(16),r.showKeywords||t.add(17),r.showWords||t.add(18),r.showColors||t.add(19),r.showFiles||t.add(20),r.showReferences||t.add(21),r.showColors||t.add(22),r.showFolders||t.add(23),r.showTypeParameters||t.add(24),r.showSnippets||t.add(27),r.showUsers||t.add(25),r.showIssues||t.add(26),{itemKind:t,showDeprecated:r.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Yt(e.leadingLineContent)!==Yt(this._context.leadingLineContent)){this.cancel();return}if(e.column