diff --git a/feat/inbound-tx-notifications/data/38dc39685b5cc8a1297dbc485af3058ca7739b5c.zip b/feat/inbound-tx-notifications/data/38dc39685b5cc8a1297dbc485af3058ca7739b5c.zip new file mode 100644 index 00000000..47d9115c Binary files /dev/null and b/feat/inbound-tx-notifications/data/38dc39685b5cc8a1297dbc485af3058ca7739b5c.zip differ diff --git a/feat/inbound-tx-notifications/data/530c86e7c47706a651729f254dc3fd8c4e93490b.zip b/feat/inbound-tx-notifications/data/530c86e7c47706a651729f254dc3fd8c4e93490b.zip new file mode 100644 index 00000000..0149d395 Binary files /dev/null and b/feat/inbound-tx-notifications/data/530c86e7c47706a651729f254dc3fd8c4e93490b.zip differ diff --git a/feat/inbound-tx-notifications/data/5e0400311555844d7af9b9d31b334463bdb82e36.zip b/feat/inbound-tx-notifications/data/5e0400311555844d7af9b9d31b334463bdb82e36.zip new file mode 100644 index 00000000..5e63fd0f Binary files /dev/null and b/feat/inbound-tx-notifications/data/5e0400311555844d7af9b9d31b334463bdb82e36.zip differ diff --git a/feat/inbound-tx-notifications/index.html b/feat/inbound-tx-notifications/index.html new file mode 100644 index 00000000..0c145c74 --- /dev/null +++ b/feat/inbound-tx-notifications/index.html @@ -0,0 +1,71 @@ + + + + + + + + + Playwright Test Report + + + + +
+ + + \ No newline at end of file diff --git a/feat/inbound-tx-notifications/trace/assets/codeMirrorModule-aLkSUGpW.js b/feat/inbound-tx-notifications/trace/assets/codeMirrorModule-aLkSUGpW.js new file mode 100644 index 00000000..7d6451a2 --- /dev/null +++ b/feat/inbound-tx-notifications/trace/assets/codeMirrorModule-aLkSUGpW.js @@ -0,0 +1,24 @@ +import{n as bu,o as ku}from"./defaultSettingsView-CxUo6zd3.js";var ya={exports:{}};(function(Et,zt){(function(C,De){Et.exports=De()})(ku,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Lt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var vi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,x=[],M=0;M-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),se&&e.ctrlKey&&t==1&&(t=3),t}var mi=function(){if(b&&N<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=d("span","​");J(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&N<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=J(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var Pt=` + +b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` +`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function yi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?L(n,ce(e,n).text.length):ka(t,ce(e,t.line).text.length)}function ka(e,t){var n=e.ch;return n==null||n>t?L(e.line,t):n<0?L(e.line,0):e}function po(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function go(e,t,n,r){var i=[e.state.modeGen],o={};ko(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,ko(e,t.text,h.mode,n,function(x,M){for(var E=v;kx&&i.splice(v,1,x,i[v+1],R),v+=2,k=Math.min(x,R)}if(M)if(h.opaque)i.splice(E,v-E,x,"overlay "+M),v=E+2;else for(;Ee.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=go(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=wa(e,t,n),l=o>r.first&&ce(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){xi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var yo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ce(i,t);var a=ce(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&xi(e,t,r,h.pos),h.pos=t.length,v=null):v=bo(bi(n,h,r.state,k),o),k){var x=k[0].name;x&&(v="m-"+(v?x+" "+v:x))}if(!a||u!=v){for(;sl;--a){if(a<=o.first)return o.first;var s=ce(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Le(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function Sa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ce(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Fa(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var ee=0;ee0)){var h=[s,1],v=Z(u.from,a.from),k=Z(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function To(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||wi(r,o.marker)<0)&&(r=o.marker)}return r}function Mo(e,t,n,r,i){var o=ce(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,n)>=0:Z(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,r)<=0:Z(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Do(e);)e=t.find(-1,!0).line;return e}function Na(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function Oa(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Si(e,t){var n=ce(e,t),r=qt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=ce(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Lo(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function Pa(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),To(e),Lo(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function Ia(e){e.parent=null,To(e)}var za={},Ba={};function Ao(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ba:za;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var n=S("span",null,null,_?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=_a,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=Ra(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);qa(o,r,vo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=le(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=le(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(_){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=le(r.pre.className,r.textClass||"")),r}function Wa(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function _a(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?Ha(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&N<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),x=k?k.index-v:t.length-v;if(x){var M=document.createTextNode(a.slice(v,v+x));b&&N<9?h.appendChild(d("span",[M])):h.appendChild(M),e.map.push(e.pos,e.pos+x,M),e.col+=x,e.pos+=x}if(!k)break;v+=x+1;var E=void 0;if(k[0]==" "){var R=e.cm.options.tabSize,U=R-e.col%R;E=h.appendChild(d("span",et(U),"cm-tab")),E.setAttribute("role","presentation"),E.setAttribute("cm-text"," "),e.col+=U}else k[0]=="\r"||k[0]==` +`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"␤","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function Ha(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function No(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function qa(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;ls||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||wi(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Ao(n[u++],t.cm.options)}}}function Oo(e,t,n){this.line=t,this.rest=Oa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ho(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function $a(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Oo(e.doc,t,n);r.lineN=n;var i=r.built=Eo(e,r);return r.text=i.pre,J(e.display.lineMeasure,i.pre),r}function Ro(e,t,n,r){return Zt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function ts(e,t,n,r){var i=jo(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Me(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(b&&N<9&&!l&&(!u||!u.left&&!u.right)){var k=o.parentNode.getClientRects()[0];k?u={left:k.left,right:k.left+Kr(e.display),top:k.top,bottom:k.bottom}:u=qo}for(var x=u.top-t.rect.top,M=u.bottom-t.rect.top,E=(x+M)/2,R=t.view.measure.heights,U=0;U=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(M,E,R){var U=a[E],Q=U.level==1;return l(R?M-1:M,Q!=R)}var v=lr(a,s,u),k=br,x=h(s,v,u=="before");return k!=null&&(x.other=h(s,k,u!="before")),x}function Zo(e,t){var n=0;t=Ce(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ce(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ei(e,t,n,r,i){var o=L(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Ni(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ei(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Ei(r.first+r.size-1,ce(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ce(r,i);;){var a=ns(e,l,i,t,n),s=Ea(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ce(r,i=u.line)}}function Jo(e,t,n,r){r-=Ai(t);var i=t.text.length,o=Nt(function(l){return Zt(e,n,l-1).bottom<=r},i,0);return i=Nt(function(l){return Zt(e,n,l).top>r},o,i),{begin:o,end:i}}function Qo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Zt(e,n,r),"line").top;return Jo(e,t,n,i)}function Oi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ns(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ai(t),a=0,s=t.text.length,u=!0,h=We(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?os:is)(e,t,n,o,h,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var k=null,x=null,M=Nt(function(me){var pe=Zt(e,o,me);return pe.top+=l,pe.bottom+=l,Oi(pe,r,i,!1)?(pe.top<=i&&pe.left<=r&&(k=me,x=pe),!0):!1},a,s),E,R,U=!1;if(x){var Q=r-x.left=ee.bottom?1:0}return M=Lt(t.text,M,1),Ei(n,M,R,U,r-E)}function is(e,t,n,r,i,o,l){var a=Nt(function(v){var k=i[v],x=k.level!=1;return Oi(jt(e,L(n,x?k.to:k.from,x?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,L(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Oi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function os(e,t,n,r,i,o,l){var a=Jo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,k=0;k=u||x.to<=s)){var M=x.level!=1,E=Zt(e,r,M?Math.min(u,x.to)-1:Math.max(s,x.from)).right,R=ER)&&(h=x,v=R)}}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(d("br"));Sr.appendChild(document.createTextNode("x"))}J(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");J(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pi(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Ii(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ii(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Vo(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ce(e.doc,s.line).text).length==s.ch){var h=Le(u,u.length,e.options.tabSize)-u.length;s=L(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Lr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&Si(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Lr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);oe(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Lr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Si(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function ls(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Lr(e,n)))),r.viewTo=n}function $o(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(d("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function as(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(G,ee,me,pe){ee<0&&(ee=0),ee=Math.round(ee),pe=Math.round(pe),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+G+`px; + top: `+ee+"px; width: "+(me??s-G)+`px; + height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Qo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,fo=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=fo?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,co;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),co=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,co=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function tl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Hi(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Hi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||x<-.005)&&(ie.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function rl(e){if(e.widgets)for(var t=0;t=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ss(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","​",null,`position: absolute; + top: `+(t.top-n.viewOffset-Xn(e.display))+`px; + height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px; + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function us(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=Ri(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function fs(e,t){var n=Ri(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function Ri(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Mi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Di(n),s=t.topa-r;if(t.topi+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.leftx+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function qi(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function cs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Zo(e,t.from),r=Zo(e,t.to);nl(e,n,r,t.margin)}}function nl(e,t,n,r){var i=Ri(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ki(e,{top:t}),il(e,t,!0),I&&Ki(e),kn(e,100))}function il(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ul(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Di(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=se&&!ke?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new be,this.disableVert=new be},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=xn(e));var n=e.display.barWidth,r=e.display.barHeight;ol(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ol(e,xn(e)),n=e.display.barWidth,r=e.display.barHeight}function ol(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var ll={native:Dr,null:bn};function al(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ll[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Cr(e,t):yn(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var ds=0;function Mr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ds,markArrays:null},ja(e.curOp)}function Fr(e){var t=e.curOp;t&&Ua(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function gs(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function vs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=xn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ro(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ms(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=go(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),k=0;!v&&kn)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Dt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&$o(e)==0)return!1;fl(e)&&(hr(e),t.dims=Pi(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Si(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;ls(e,o,l),n.viewOffset=er(ce(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=$o(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=ks(e);return s>4&&(n.lineDiv.style.display="none"),Ss(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ws(u),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function sl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Di(e.display)-Mi(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!ji(e,t))break;Vn(e);var i=xn(e);vn(e),Xr(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,t){var n=new ti(e,t);if(ji(e,n)){Vn(e),sl(e,n);var r=xn(e);vn(e),Xr(e,r),Gi(e,r),n.finish()}}function Ss(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(M){var E=M.nextSibling;return _&&se&&e.display.currentWheelTarget==M?M.style.display="none":M.parentNode.removeChild(M),E}for(var s=r.view,u=r.viewFrom,h=0;h-1&&(x=!1),Po(e,v,u,n)),x&&(D(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(W(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yt(e)+"px"}function ul(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ii(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&N<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!_&&!(I&&ne)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Xi(r.gutters,r.lineNumbers),cl(i),n.init(i)}var ri=0,rr=null;b?rr=-.53:I?rr=15:O?rr=-.7:X&&(rr=-1/3);function dl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Ls(e){var t=dl(e);return t.x*=rr,t.y*=rr,t}function hl(e,t){O&&q==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=dl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&se&&_){e:for(var h=t.target,v=l.view;h!=a;h=h.parentNode)for(var k=0;k=0&&Z(e,r.to())<=0)return n}return-1};var He=function(e,t){this.anchor=e,this.head=t};He.prototype.from=function(){return _r(this.anchor,this.head)},He.prototype.to=function(){return xt(this.anchor,this.head)},He.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(k,x){return Z(k.from(),x.from())}),n=oe(t,i);for(var o=1;o0:s>=0){var u=_r(a.from(),l.from()),h=xt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new He(v?h:u,v?u:h))}}return new At(t,n)}function pr(e,t){return new At([new He(e,t||e)],0)}function gr(e){return e.text?L(e.from.line+e.text.length-1,ge(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function pl(e,t){if(Z(e,t.from)<0)return e;if(Z(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),L(n,r)}function Yi(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,M-1),e.insert(a.line+1,U)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ge(e.done)}function bl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ms(i,i.lastOp==r)))a=ge(l.changes),Z(t.from,t.to)==0&&Z(t.from,a.to)==0?a.to=gr(t):l.changes.push(Qi(e,t));else{var s=ge(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Qi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function Fs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function As(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Fs(e,o,ge(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&xl(i.undone)}function ii(e,t){var n=ge(t);n&&n.ranges&&n.equals(e)||t.push(e)}function kl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Es(e){if(!e)return null;for(var t,n=0;n-1&&(ge(a)[v]=u[v],delete u[v])}}return r}function Vi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=Z(t,i)<0;o!=Z(n,i)<0?(i=t,t=n):o!=Z(t,n)<0&&(t=n)}return new He(i,t)}else return new He(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),pt(e,new At([Vi(e.sel.primary(),t,n,i)],0),r)}function Sl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),k=void 0;if((r<0?h:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(k=Z(v,n))&&(r<0?k<0:k>0))return Zr(e,v,t,r,i)}var x=s.find(r<0?-1:1);return(r<0?u:h)&&(x=Fl(e,x,r,x.line==t.line?o:null)),x?Zr(e,x,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Zr(e,t,n,o,i)||!i&&Zr(e,t,n,o,!0)||Zr(e,t,n,-o,i)||!i&&Zr(e,t,n,-o,!0);return l||(e.cantEdit=!0,L(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ce(e,L(t.line-1)):null:n>0&&t.ch==(r||ce(e,t.line)).text.length?t.line=0;--i)Nl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Nl(e,t)}}function Nl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Z(t.from,t.to)==0)){var n=Yi(e,t);bl(e,t,n,e.cm?e.cm.curOp.id:NaN),Tn(e,t,n,ki(e,t));var r=[];vr(e,function(i,o){!o&&oe(r,i.history)==-1&&(zl(i.history,t),r.push(i.history)),Tn(i,t,null,ki(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u=0;--x){var M=k(x);if(M)return M.v}}}}function Ol(e,t){if(t!=0&&(e.first+=t,e.sel=new At(Pe(e.sel.ranges,function(i){return new He(L(i.anchor.line+t,i.anchor.ch),L(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:L(o,ce(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Yi(e,t)),e.cm?Ps(e.cm,t,r):Ji(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,L(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ps(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ce(r,o.line))),r.iter(s,l.line+1,function(x){if(x==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ot(e),Ji(r,t,n,Vo(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(x){var M=Un(x);M>i.maxLineLength&&(i.maxLine=x,i.maxLineLength=M,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Sa(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?bt(e):o.line==l.line&&t.text.length==1&&!vl(e.doc,t)?dr(e,o.line,"text"):bt(e,o.line,l.line+1,u);var h=Ct(e,"changes"),v=Ct(e,"change");if(v||h){var k={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&ot(e,"change",e,k),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(k)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),Z(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function Pl(e,t,n,r){n1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Dl(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Fr(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=S("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Mo(e,t.line,t,n,o)||t.line!=n.line&&Mo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");La()}o.addToHistory&&bl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&qt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Ft(v,0),Da(v,new Rn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){cr(e,v)&&Ft(v,0)}),o.clearOnEnter&&ve(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ta(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Wl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)bt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Dl(s.doc),ot(s,"markerAdded",s,o)}return o}var Fn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;s--)Jr(this,r[s]);a?Ll(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ce(this,e),t=Ce(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),Ce(this,L(n,t))},indexFromPos:function(e){e=Ce(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function eo(e,t,n){var r=Lt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function to(e,t,n){var r=eo(e,t.ch,n);return r==null?null:new L(t.line,r,n<0?"after":"before")}function ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=We(n,t.doc.direction);if(o){var l=i<0?ge(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var v=Zt(t,h,u).top;u=Nt(function(k){return Zt(t,h,k).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=eo(n,u,1))}else u=i<0?l.to:l.from;return new L(r,u,s)}}return new L(r,i<0?n.text.length:0,i<0?"before":"after")}function Ys(e,t,n,r){var i=We(t,e.doc.direction);if(!i)return to(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&k>=h.begin)){var x=v?"before":"after";return new L(n.line,k,x)}}var M=function(U,Q,G){for(var ee=function(Ke,st){return st?new L(n.line,a(Ke,1),"before"):new L(n.line,Ke,"after")};U>=0&&U0==(me.level!=1),Fe=pe?G.begin:a(G.end,-1);if(me.from<=Fe&&Fe0?h.end:a(h.begin,-1);return R!=null&&!(r>0&&R==t.text.length)&&(E=M(r>0?0:i.length-1,r,u(R)),E)?E:null}var Nn={selectAll:Al,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ce(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ce(e.doc,i.line-1).text;l&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),L(i.line-1,l.length-1),i,"+transpose"))}}n.push(new He(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Dt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function tu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new io(n,e,t),Pn=null,"double"):(Pn=new io(n,e,t),In=null,"single")}function ea(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!oo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?tu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ru(t,i,r,o,e))&&(i==1?r?iu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):_i(t)))}}}function ru(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Ul(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function nu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function iu(e,t,n,r){b?setTimeout(ue(tl,e),0):e.curOp.focus=y(Y(e));var i=nu(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&mi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?ou(e,r,t,i):lu(e,r,t,i)}function ou(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.addNew||oi(e.doc,n,null,null,r.extend),_&&!X||b&&N==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};_&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",l),ve(i.wrapper.ownerDocument,"mousemove",a),ve(i.scroller,"dragstart",s),ve(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ta(e,t,n){if(n=="char")return new He(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new He(L(t.line,0),Ce(e.doc,L(t.line+1,0)));var r=n(e,t);return new He(r.from,r.to)}function lu(e,t,n,r){b&&_i(e);var i=e.display,o=e.doc;ht(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new He(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new He(n,n)),n=Tr(e,t,!0,!0),a=-1;else{var h=ta(e,n,r.unit);r.extend?l=Vi(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,pt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(pt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):$i(o,a,l,ct):(a=0,pt(o,new At([l],0),ct),s=o.sel);var v=n;function k(G){if(Z(v,G)!=0)if(v=G,r.unit=="rectangle"){for(var ee=[],me=e.options.tabSize,pe=Le(ce(o,n.line).text,n.ch,me),Fe=Le(ce(o,G.line).text,G.ch,me),Ke=Math.min(pe,Fe),st=Math.max(pe,Fe),Xe=Math.min(n.line,G.line),Mt=Math.min(e.lastLine(),Math.max(n.line,G.line));Xe<=Mt;Xe++){var wt=ce(o,Xe).text,tt=Re(wt,Ke,me);Ke==st?ee.push(new He(L(Xe,tt),L(Xe,tt))):wt.length>tt&&ee.push(new He(L(Xe,tt),L(Xe,Re(wt,st,me))))}ee.length||ee.push(new He(n,n)),pt(o,Kt(e,s.ranges.slice(0,a).concat(ee),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(G)}else{var St=l,ft=ta(e,G,r.unit),nt=St.anchor,rt;Z(ft.anchor,nt)>0?(rt=ft.head,nt=_r(St.from(),ft.anchor)):(rt=ft.anchor,nt=xt(St.to(),ft.head));var Qe=s.ranges.slice(0);Qe[a]=au(e,new He(Ce(o,nt),rt)),pt(o,Kt(e,Qe,a),ct)}}var x=i.wrapper.getBoundingClientRect(),M=0;function E(G){var ee=++M,me=Tr(e,G,!0,r.unit=="rectangle");if(me)if(Z(me,v)!=0){e.curOp.focus=y(Y(e)),k(me);var pe=$n(i,o);(me.line>=pe.to||me.linex.bottom?20:0;Fe&&setTimeout(lt(e,function(){M==ee&&(i.scroller.scrollTop+=Fe,E(G))}),50)}}function R(G){e.state.selectingText=!1,M=1/0,G&&(ht(G),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",U),dt(i.wrapper.ownerDocument,"mouseup",Q),o.history.lastSelOrigin=null}var U=lt(e,function(G){G.buttons===0||!Wt(G)?R(G):E(G)}),Q=lt(e,R);e.state.selectingText=Q,ve(i.wrapper.ownerDocument,"mousemove",U),ve(i.wrapper.ownerDocument,"mouseup",Q)}function au(e,t){var n=t.anchor,r=t.head,i=ce(e.doc,n.line);if(Z(n,r)==0&&n.sticky==r.sticky)return t;var o=We(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),v=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var k=o[s+(u?-1:0)],x=u==(k.level==1),M=x?k.from:k.to,E=x?"after":"before";return n.ch==M&&n.sticky==E?t:new He(new L(n.line,M,E),r)}function ra(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ht(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(e,n))return yt(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var h=g(e.doc,o),v=e.display.gutterSpecs[s];return Ye(e,n,e,h,v.className,t),yt(t)}}}function oo(e,t){return ra(e,t,"gutterClick",!0)}function na(e,t){tr(e.display,t)||su(e,t)||Ze(e,t,"contextmenu")||fe||e.display.input.onContextMenu(t)}function su(e,t){return Ct(e,"gutterContextMenu")?ra(e,t,"gutterContextMenu",!1):!1}function ia(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},oa={},di={};function uu(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Zi(r)},!0),n("indentUnit",2,Zi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(L(l,h))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],L(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",Wa,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ne?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ye),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){ia(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,cu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Xi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ii(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){al(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Xi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,fu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function fu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?ve:dt;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function cu(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ee(e.display.wrapper,"CodeMirror-wrap"),Li(e)),zi(e),bt(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Te(t):{},Te(oa,t,!1);var r=t.value;typeof r=="string"?r=new kt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new Ts(e,r,i,t);o.wrapper.CodeMirror=this,ia(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),al(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new be,keySeq:null,specialChars:null},t.autofocus&&!ne&&o.input.focus(),b&&N<11&&setTimeout(function(){return n.display.input.reset(!0)},20),du(this),js(),Mr(this),this.curOp.forceUpdate=!0,ml(this,r),t.autofocus&&!ne||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Hi(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);fl(this),t.finishInit&&t.finishInit(this);for(var a=0;a20*20}ve(t.scroller,"touchstart",function(s){if(!Ze(e,s)&&!o(s)&&!oo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new He(h,h):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(h):v=new He(L(h.line,0),Ce(e.doc,L(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ht(s)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(s){return hl(e,s)}),ve(t.scroller,"DOMMouseScroll",function(s){return hl(e,s)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ze(e,s)||ar(s)},over:function(s){Ze(e,s)||(qs(e,s),ar(s))},start:function(s){return Rs(e,s)},drop:lt(e,Hs),leave:function(s){Ze(e,s)||Rl(e)}};var a=t.input.getField();ve(a,"keyup",function(s){return Vl.call(e,s)}),ve(a,"keydown",lt(e,Ql)),ve(a,"keypress",lt(e,$l)),ve(a,"focus",function(s){return Hi(e,s)}),ve(a,"blur",function(s){return Ur(e,s)})}var lo=[];Ge.defineInitHook=function(e){return lo.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ce(i,t),s=Le(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Le(ce(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",k=0;if(e.options.indentWithTabs)for(var x=Math.floor(h/l);x;--x)k+=l,v+=" ";if(kl,s=Pt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(` +`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(` +`)==s.join(` +`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&aa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function la(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return ao(t,n,0,null,"paste")}),!0}function aa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function sa(e){for(var t=[],n=[],r=0;ro&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v0&&$i(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return xo(this,r,i)},getLineTokens:function(r,i){return xo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=vo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]s&&(r=s,l=!0),a=ce(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Ce(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),k=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>k&&(h=k-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&fs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:vt(Ql),triggerOnKeyPress:vt($l),triggerOnKeyUp:Vl,triggerOnMouseDown:vt(ea),execCommand:function(r){if(Nn.hasOwnProperty(r))return Nn[r].call(null,this)},triggerElectric:vt(function(r){aa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Ce(this.doc,r),u=0;u0&&h(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&zi(this),Ye(this,"refresh",this)}),swapDoc:vt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ml(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function uo(e,t,n,r,i){var o=t,l=n,a=ce(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var Q=t.line+s;return Q=e.first+e.size?!1:(t=new L(Q,t.ch,t.sticky),a=ce(e,Q))}function h(Q){var G;if(r=="codepoint"){var ee=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ee))G=null;else{var me=n>0?ee>=55296&&ee<56320:ee>=56320&&ee<57343;G=new L(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(me?2:1))),-n)}}else i?G=Ys(e.cm,a,t,n):G=to(a,t,n);if(G==null)if(!Q&&u())t=ro(i,e.cm,a,t.line,s);else return!1;else t=G;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,k=r=="group",x=e.cm&&e.cm.getHelper(t,"wordChars"),M=!0;!(n<0&&!h(!M));M=!1){var E=a.text.charAt(t.ch)||` +`,R=Se(E,x)?"w":k&&E==` +`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function fa(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Ni(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,so(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||la(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=sa(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(` +`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=ua(),v=h.firstChild;so(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(` +`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=el(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ca(t,r)||{node:a[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(gu(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);xr.ch&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)x--,M++;v[v.length-1]=Q.slice(0,Q.length-M).replace(/^\u200b+/,""),v[0]=v[0].slice(x).replace(/\u200b+$/,"");var me=L(l,x),pe=L(u,k.length?ge(k).length-M:0);if(v.length>1||v[0]||Z(me,pe))return Qr(e.doc,v,me,pe,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Dt(this.cm,function(){return bt(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,ao)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function ca(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=ce(e.doc,t.line),i=Ho(n,r,t.line),o=We(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=jo(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function pu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function gu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(x){return function(M){return M.id==x}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(x){x&&(h(),o+=x)}function k(x){if(x.nodeType==1){var M=x.getAttribute("cm-text");if(M){v(M);return}var E=x.getAttribute("cm-marker"),R;if(E){var U=e.findMarks(L(r,0),L(i+1,0),u(+E));U.length&&(R=U[0].find(0))&&v(Vt(e.doc,R.from,R.to).join(a));return}if(x.getAttribute("contenteditable")=="false")return;var Q=/^(pre|div|p|li|table|br)$/i.test(x.nodeName);if(!/^br$/i.test(x.nodeName)&&x.textContent.length==0)return;Q&&h();for(var G=0;G=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ve(i,"paste",function(l){Ze(r,l)||la(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Ze(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=sa(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(` +`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=ua(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;so(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=el(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l1e3||i.indexOf(` +`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; + z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R="​"+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"​",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?lt(n,Al)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function mu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function yu(e){e.off=dt,e.on=ve,e.wheelEventPixels=Ls,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=ll,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Gl,e.isModifierKey=Kl,e.lookupKey=$r,e.normalizeKeyMap=Xs,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}uu(Ge),hu(Ge);var xu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(xu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=mu,yu(Ge),Ge.version="5.65.18",Ge})})(ya);var It=ya.exports;const Cu=bu(It);var wu={exports:{}};(function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return oe("meta","meta")}else return/[,+>*\/]/.test(F)?oe(null,"select-op"):F=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?oe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(F)?oe(null,F):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(B.tokenize=Ve),oe("variable callee","variable")):/[\w\\\-]/.test(F)?(T.eatWhile(/[\w\\\-]/),oe("property","word")):oe(null,null)}function qe(T){return function(B,F){for(var Ie=!1,ae;(ae=B.next())!=null;){if(ae==T&&!Ie){T==")"&&B.backUp(1);break}Ie=!Ie&&ae=="\\"}return(ae==T||!Ie&&T!=")")&&(F.tokenize=null),oe("string","string")}}function Ve(T,B){return T.next(),T.match(/^\s*[\"\')]/,!1)?B.tokenize=null:B.tokenize=qe(")"),oe(null,"(")}function ct(T,B,F){this.type=T,this.indent=B,this.prev=F}function Oe(T,B,F,Ie){return T.context=new ct(F,B.indentation()+(Ie===!1?0:D),T.context),F}function Re(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function Ue(T,B,F){return Pe[F.context.type](T,B,F)}function et(T,B,F,Ie){for(var ae=Ie||1;ae>0;ae--)F.context=F.context.prev;return Ue(T,B,F)}function ge(T){var B=T.current().toLowerCase();Y.hasOwnProperty(B)?be="atom":c.hasOwnProperty(B)?be="keyword":be="variable"}var Pe={};return Pe.top=function(T,B,F){if(T=="{")return Oe(F,B,"block");if(T=="}"&&F.context.prev)return Re(F);if(ue&&/@component/i.test(T))return Oe(F,B,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Oe(F,B,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Oe(F,B,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return F.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Oe(F,B,"at");if(T=="hash")be="builtin";else if(T=="word")be="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Oe(F,B,"interpolation");if(T==":")return"pseudo";if(xe&&T=="(")return Oe(F,B,"parens")}return F.context.type},Pe.block=function(T,B,F){if(T=="word"){var Ie=B.current().toLowerCase();return y.hasOwnProperty(Ie)?(be="property","maybeprop"):P.hasOwnProperty(Ie)?(be=Te?"string-2":"property","maybeprop"):xe?(be=B.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return T=="meta"?"block":!xe&&(T=="hash"||T=="qualifier")?(be="error","block"):Pe.top(T,B,F)},Pe.maybeprop=function(T,B,F){return T==":"?Oe(F,B,"prop"):Ue(T,B,F)},Pe.prop=function(T,B,F){if(T==";")return Re(F);if(T=="{"&&xe)return Oe(F,B,"propBlock");if(T=="}"||T=="{")return et(T,B,F);if(T=="(")return Oe(F,B,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(B.current()))be+=" error";else if(T=="word")ge(B);else if(T=="interpolation")return Oe(F,B,"interpolation");return"prop"},Pe.propBlock=function(T,B,F){return T=="}"?Re(F):T=="word"?(be="property","maybeprop"):F.context.type},Pe.parens=function(T,B,F){return T=="{"||T=="}"?et(T,B,F):T==")"?Re(F):T=="("?Oe(F,B,"parens"):T=="interpolation"?Oe(F,B,"interpolation"):(T=="word"&&ge(B),"parens")},Pe.pseudo=function(T,B,F){return T=="meta"?"pseudo":T=="word"?(be="variable-3",F.context.type):Ue(T,B,F)},Pe.documentTypes=function(T,B,F){return T=="word"&&d.hasOwnProperty(B.current())?(be="tag",F.context.type):Pe.atBlock(T,B,F)},Pe.atBlock=function(T,B,F){if(T=="(")return Oe(F,B,"atBlock_parens");if(T=="}"||T==";")return et(T,B,F);if(T=="{")return Re(F)&&Oe(F,B,xe?"block":"top");if(T=="interpolation")return Oe(F,B,"interpolation");if(T=="word"){var Ie=B.current().toLowerCase();Ie=="only"||Ie=="not"||Ie=="and"||Ie=="or"?be="keyword":S.hasOwnProperty(Ie)?be="attribute":w.hasOwnProperty(Ie)?be="property":m.hasOwnProperty(Ie)?be="keyword":y.hasOwnProperty(Ie)?be="property":P.hasOwnProperty(Ie)?be=Te?"string-2":"property":Y.hasOwnProperty(Ie)?be="atom":c.hasOwnProperty(Ie)?be="keyword":be="error"}return F.context.type},Pe.atComponentBlock=function(T,B,F){return T=="}"?et(T,B,F):T=="{"?Re(F)&&Oe(F,B,xe?"block":"top",!1):(T=="word"&&(be="error"),F.context.type)},Pe.atBlock_parens=function(T,B,F){return T==")"?Re(F):T=="{"||T=="}"?et(T,B,F,2):Pe.atBlock(T,B,F)},Pe.restricted_atBlock_before=function(T,B,F){return T=="{"?Oe(F,B,"restricted_atBlock"):T=="word"&&F.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):Ue(T,B,F)},Pe.restricted_atBlock=function(T,B,F){return T=="}"?(F.stateArg=null,Re(F)):T=="word"?(F.stateArg=="@font-face"&&!le.hasOwnProperty(B.current().toLowerCase())||F.stateArg=="@counter-style"&&!p.hasOwnProperty(B.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Pe.keyframes=function(T,B,F){return T=="word"?(be="variable","keyframes"):T=="{"?Oe(F,B,"top"):Ue(T,B,F)},Pe.at=function(T,B,F){return T==";"?Re(F):T=="{"||T=="}"?et(T,B,F):(T=="word"?be="tag":T=="hash"&&(be="builtin"),"at")},Pe.interpolation=function(T,B,F){return T=="}"?Re(F):T=="{"||T==";"?et(T,B,F):(T=="word"?be="variable":T!="variable"&&T!="("&&T!=")"&&(be="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new ct(Ee?"block":"top",T||0,null)}},token:function(T,B){if(!B.tokenize&&T.eatSpace())return null;var F=(B.tokenize||Ne)(T,B);return F&&typeof F=="object"&&(Le=F[1],F=F[0]),be=F,Le!="comment"&&(B.state=Pe[B.state](Le,T,B)),be},indent:function(T,B){var F=T.context,Ie=B&&B.charAt(0),ae=F.indent;return F.type=="prop"&&(Ie=="}"||Ie==")")&&(F=F.prev),F.prev&&(Ie=="}"&&(F.type=="block"||F.type=="top"||F.type=="interpolation"||F.type=="restricted_atBlock")?(F=F.prev,ae=F.indent):(Ie==")"&&(F.type=="parens"||F.type=="atBlock_parens")||Ie=="{"&&(F.type=="at"||F.type=="atBlock"))&&(ae=Math.max(0,F.indent-D))),ae},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:j,fold:"brace"}});function De(fe){for(var H={},Ee=0;Ee")):null:d.match("--")?w(ke("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),w(we(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=ke("meta","?>"),"meta"):(ie=d.eat("/")?"closeTag":"openTag",S.tokenize=z,"tag bracket");if(m=="&"){var y;return d.eat("#")?d.eat("x")?y=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):y=d.eatWhile(/[\d]/)&&d.eat(";"):y=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),y?"atom":"error"}else return d.eatWhile(/[^&<]/),null}q.isInText=!0;function z(d,S){var w=d.next();if(w==">"||w=="/"&&d.eat(">"))return S.tokenize=q,ie=w==">"?"endTag":"selfcloseTag","tag bracket";if(w=="=")return ie="equals",null;if(w=="<"){S.tokenize=q,S.state=Ae,S.tagName=S.tagStart=null;var m=S.tokenize(d,S);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(w)?(S.tokenize=X(w),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function X(d){var S=function(w,m){for(;!w.eol();)if(w.next()==d){m.tokenize=z;break}return"string"};return S.isInAttribute=!0,S}function ke(d,S){return function(w,m){for(;!w.eol();){if(w.match(S)){m.tokenize=q;break}w.next()}return d}}function we(d){return function(S,w){for(var m;(m=S.next())!=null;){if(m=="<")return w.tokenize=we(d+1),w.tokenize(S,w);if(m==">")if(d==1){w.tokenize=q;break}else return w.tokenize=we(d-1),w.tokenize(S,w)}return"meta"}}function te(d){return d&&d.toLowerCase()}function re(d,S,w){this.prev=d.context,this.tagName=S||"",this.indent=d.indented,this.startOfLine=w,(b.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function ne(d){d.context&&(d.context=d.context.prev)}function se(d,S){for(var w;;){if(!d.context||(w=d.context.tagName,!b.contextGrabbers.hasOwnProperty(te(w))||!b.contextGrabbers[te(w)].hasOwnProperty(te(S))))return;ne(d)}}function Ae(d,S,w){return d=="openTag"?(w.tagStart=S.column(),ye):d=="closeTag"?de:Ae}function ye(d,S,w){return d=="word"?(w.tagName=S.current(),O="tag",H):b.allowMissingTagName&&d=="endTag"?(O="tag bracket",H(d,S,w)):(O="error",ye)}function de(d,S,w){if(d=="word"){var m=S.current();return w.context&&w.context.tagName!=m&&b.implicitlyClosed.hasOwnProperty(te(w.context.tagName))&&ne(w),w.context&&w.context.tagName==m||b.matchClosing===!1?(O="tag",ze):(O="tag error",fe)}else return b.allowMissingTagName&&d=="endTag"?(O="tag bracket",ze(d,S,w)):(O="error",fe)}function ze(d,S,w){return d!="endTag"?(O="error",ze):(ne(w),Ae)}function fe(d,S,w){return O="error",ze(d,S,w)}function H(d,S,w){if(d=="word")return O="attribute",Ee;if(d=="endTag"||d=="selfcloseTag"){var m=w.tagName,y=w.tagStart;return w.tagName=w.tagStart=null,d=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(te(m))?se(w,m):(se(w,m),w.context=new re(w,m,y==w.indented)),Ae}return O="error",H}function Ee(d,S,w){return d=="equals"?D:(b.allowMissing||(O="error"),H(d,S,w))}function D(d,S,w){return d=="string"?J:d=="word"&&b.allowUnquoted?(O="string",H):(O="error",H(d,S,w))}function J(d,S,w){return d=="string"?J:H(d,S,w)}return{startState:function(d){var S={tokenize:q,state:Ae,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;ie=null;var w=S.tokenize(d,S);return(w||ie)&&w!="comment"&&(O=null,S.state=S.state(ie||w,d,S),O&&(w=O=="error"?w+" error":O)),w},indent:function(d,S,w){var m=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+V;if(m&&m.noIndent)return C.Pass;if(d.tokenize!=z&&d.tokenize!=q)return w?w.match(/^(\s*)/)[0].length:0;if(d.tagName)return b.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+V*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(d){d.state==D&&(d.state=H)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],w=d.context;w;w=w.prev)S.push(w.tagName);return S.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),da.exports}var pa={exports:{}},ga;function ba(){return ga||(ga=1,function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("javascript",function(De,I){var K=De.indentUnit,$=I.statementIndent,V=I.jsonld,b=I.json||V,N=I.trackScope!==!1,_=I.typescript,ie=I.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function f(it){return{type:it,style:"keyword"}}var g=f("keyword a"),A=f("keyword b"),W=f("keyword c"),L=f("keyword d"),Z=f("operator"),_e={type:"atom",style:"atom"};return{if:f("if"),while:g,with:g,else:A,do:A,try:A,finally:A,return:L,break:L,continue:L,new:f("new"),delete:W,void:W,throw:W,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:Z,typeof:Z,instanceof:Z,true:_e,false:_e,null:_e,undefined:_e,NaN:_e,Infinity:_e,this:f("this"),class:f("class"),super:f("atom"),yield:W,export:f("export"),import:f("import"),extends:W,await:W}}(),q=/[+\-*&%=<>!?|~^@]/,z=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function X(f){for(var g=!1,A,W=!1;(A=f.next())!=null;){if(!g){if(A=="/"&&!W)return;A=="["?W=!0:W&&A=="]"&&(W=!1)}g=!g&&A=="\\"}}var ke,we;function te(f,g,A){return ke=f,we=A,g}function re(f,g){var A=f.next();if(A=='"'||A=="'")return g.tokenize=ne(A),g.tokenize(f,g);if(A=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return te("number","number");if(A=="."&&f.match(".."))return te("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(A))return te(A);if(A=="="&&f.eat(">"))return te("=>","operator");if(A=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return te("number","number");if(/\d/.test(A))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),te("number","number");if(A=="/")return f.eat("*")?(g.tokenize=se,se(f,g)):f.eat("/")?(f.skipToEnd(),te("comment","comment")):Ft(f,g,1)?(X(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),te("regexp","string-2")):(f.eat("="),te("operator","operator",f.current()));if(A=="`")return g.tokenize=Ae,Ae(f,g);if(A=="#"&&f.peek()=="!")return f.skipToEnd(),te("meta","meta");if(A=="#"&&f.eatWhile(ie))return te("variable","property");if(A=="<"&&f.match("!--")||A=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),te("comment","comment");if(q.test(A))return(A!=">"||!g.lexical||g.lexical.type!=">")&&(f.eat("=")?(A=="!"||A=="=")&&f.eat("="):/[<>*+\-|&?]/.test(A)&&(f.eat(A),A==">"&&f.eat(A))),A=="?"&&f.eat(".")?te("."):te("operator","operator",f.current());if(ie.test(A)){f.eatWhile(ie);var W=f.current();if(g.lastType!="."){if(O.propertyIsEnumerable(W)){var L=O[W];return te(L.type,L.style,W)}if(W=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return te("async","keyword",W)}return te("variable","variable",W)}}function ne(f){return function(g,A){var W=!1,L;if(V&&g.peek()=="@"&&g.match(z))return A.tokenize=re,te("jsonld-keyword","meta");for(;(L=g.next())!=null&&!(L==f&&!W);)W=!W&&L=="\\";return W||(A.tokenize=re),te("string","string")}}function se(f,g){for(var A=!1,W;W=f.next();){if(W=="/"&&A){g.tokenize=re;break}A=W=="*"}return te("comment","comment")}function Ae(f,g){for(var A=!1,W;(W=f.next())!=null;){if(!A&&(W=="`"||W=="$"&&f.eat("{"))){g.tokenize=re;break}A=!A&&W=="\\"}return te("quasi","string-2",f.current())}var ye="([{}])";function de(f,g){g.fatArrowAt&&(g.fatArrowAt=null);var A=f.string.indexOf("=>",f.start);if(!(A<0)){if(_){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,A));W&&(A=W.index)}for(var L=0,Z=!1,_e=A-1;_e>=0;--_e){var it=f.string.charAt(_e),xt=ye.indexOf(it);if(xt>=0&&xt<3){if(!L){++_e;break}if(--L==0){it=="("&&(Z=!0);break}}else if(xt>=3&&xt<6)++L;else if(ie.test(it))Z=!0;else if(/["'\/`]/.test(it))for(;;--_e){if(_e==0)return;var _r=f.string.charAt(_e-1);if(_r==it&&f.string.charAt(_e-2)!="\\"){_e--;break}}else if(Z&&!L){++_e;break}}Z&&!L&&(g.fatArrowAt=_e)}}var ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function fe(f,g,A,W,L,Z){this.indented=f,this.column=g,this.type=A,this.prev=L,this.info=Z,W!=null&&(this.align=W)}function H(f,g){if(!N)return!1;for(var A=f.localVars;A;A=A.next)if(A.name==g)return!0;for(var W=f.context;W;W=W.prev)for(var A=W.vars;A;A=A.next)if(A.name==g)return!0}function Ee(f,g,A,W,L){var Z=f.cc;for(D.state=f,D.stream=L,D.marked=null,D.cc=Z,D.style=g,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var _e=Z.length?Z.pop():b?oe:Le;if(_e(A,W)){for(;Z.length&&Z[Z.length-1].lex;)Z.pop()();return D.marked?D.marked:A=="variable"&&H(f,W)?"variable-2":g}}}var D={state:null,column:null,marked:null,cc:null};function J(){for(var f=arguments.length-1;f>=0;f--)D.cc.push(arguments[f])}function d(){return J.apply(null,arguments),!0}function S(f,g){for(var A=g;A;A=A.next)if(A.name==f)return!0;return!1}function w(f){var g=D.state;if(D.marked="def",!!N){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var A=m(f,g.context);if(A!=null){g.context=A;return}}else if(!S(f,g.localVars)){g.localVars=new le(f,g.localVars);return}}I.globalVars&&!S(f,g.globalVars)&&(g.globalVars=new le(f,g.globalVars))}}function m(f,g){if(g)if(g.block){var A=m(f,g.prev);return A?A==g.prev?g:new P(A,g.vars,!0):null}else return S(f,g.vars)?g:new P(g.prev,new le(f,g.vars),!1);else return null}function y(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function P(f,g,A){this.prev=f,this.vars=g,this.block=A}function le(f,g){this.name=f,this.next=g}var p=new le("this",new le("arguments",null));function c(){D.state.context=new P(D.state.context,D.state.localVars,!1),D.state.localVars=p}function Y(){D.state.context=new P(D.state.context,D.state.localVars,!0),D.state.localVars=null}c.lex=Y.lex=!0;function xe(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}xe.lex=!0;function j(f,g){var A=function(){var W=D.state,L=W.indented;if(W.lexical.type=="stat")L=W.lexical.indented;else for(var Z=W.lexical;Z&&Z.type==")"&&Z.align;Z=Z.prev)L=Z.indented;W.lexical=new fe(L,D.stream.column(),f,null,W.lexical,g)};return A.lex=!0,A}function ue(){var f=D.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}ue.lex=!0;function Te(f){function g(A){return A==f?d():f==";"||A=="}"||A==")"||A=="]"?J():d(g)}return g}function Le(f,g){return f=="var"?d(j("vardef",g),Nr,Te(";"),ue):f=="keyword a"?d(j("form"),qe,Le,ue):f=="keyword b"?d(j("form"),Le,ue):f=="keyword d"?D.stream.match(/^\s*$/,!1)?d():d(j("stat"),ct,Te(";"),ue):f=="debugger"?d(Te(";")):f=="{"?d(j("}"),Y,Nt,ue,xe):f==";"?d():f=="if"?(D.state.lexical.info=="else"&&D.state.cc[D.state.cc.length-1]==ue&&D.state.cc.pop()(),d(j("form"),qe,Le,ue,Or)):f=="function"?d(Pt):f=="for"?d(j("form"),Y,Wn,Le,xe,ue):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form",f=="class"?f:g),Pr,ue)):f=="variable"?_&&g=="declare"?(D.marked="keyword",d(Le)):_&&(g=="module"||g=="enum"||g=="type")&&D.stream.match(/^\s*\w/,!1)?(D.marked="keyword",g=="enum"?d(ce):g=="type"?d(_n,Te("operator"),We,Te(";")):d(j("form"),yt,Te("{"),j("}"),Nt,ue,ue)):_&&g=="namespace"?(D.marked="keyword",d(j("form"),oe,Le,ue)):_&&g=="abstract"?(D.marked="keyword",d(Le)):d(j("stat"),Ie):f=="switch"?d(j("form"),qe,Te("{"),j("}","switch"),Y,Nt,ue,ue,xe):f=="case"?d(oe,Te(":")):f=="default"?d(Te(":")):f=="catch"?d(j("form"),c,be,Le,ue,xe):f=="export"?d(j("stat"),Ir,ue):f=="import"?d(j("stat"),fr,ue):f=="async"?d(Le):g=="@"?d(oe,Le):J(j("stat"),oe,Te(";"),ue)}function be(f){if(f=="(")return d(_t,Te(")"))}function oe(f,g){return Ve(f,g,!1)}function Ne(f,g){return Ve(f,g,!0)}function qe(f){return f!="("?J():d(j(")"),ct,Te(")"),ue)}function Ve(f,g,A){if(D.state.fatArrowAt==D.stream.start){var W=A?Pe:ge;if(f=="(")return d(c,j(")"),Me(_t,")"),ue,Te("=>"),W,xe);if(f=="variable")return J(c,yt,Te("=>"),W,xe)}var L=A?Re:Oe;return ze.hasOwnProperty(f)?d(L):f=="function"?d(Pt,L):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form"),yi,ue)):f=="keyword c"||f=="async"?d(A?Ne:oe):f=="("?d(j(")"),ct,Te(")"),ue,L):f=="operator"||f=="spread"?d(A?Ne:oe):f=="["?d(j("]"),Je,ue,L):f=="{"?Lt(Se,"}",null,L):f=="quasi"?J(Ue,L):f=="new"?d(T(A)):d()}function ct(f){return f.match(/[;\}\)\],]/)?J():J(oe)}function Oe(f,g){return f==","?d(ct):Re(f,g,!1)}function Re(f,g,A){var W=A==!1?Oe:Re,L=A==!1?oe:Ne;if(f=="=>")return d(c,A?Pe:ge,xe);if(f=="operator")return/\+\+|--/.test(g)||_&&g=="!"?d(W):_&&g=="<"&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(j(">"),Me(We,">"),ue,W):g=="?"?d(oe,Te(":"),L):d(L);if(f=="quasi")return J(Ue,W);if(f!=";"){if(f=="(")return Lt(Ne,")","call",W);if(f==".")return d(ae,W);if(f=="[")return d(j("]"),ct,Te("]"),ue,W);if(_&&g=="as")return D.marked="keyword",d(We,W);if(f=="regexp")return D.state.lastType=D.marked="operator",D.stream.backUp(D.stream.pos-D.stream.start-1),d(L)}}function Ue(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(Ue):d(ct,et)}function et(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(Ue)}function ge(f){return de(D.stream,D.state),J(f=="{"?Le:oe)}function Pe(f){return de(D.stream,D.state),J(f=="{"?Le:Ne)}function T(f){return function(g){return g=="."?d(f?F:B):g=="variable"&&_?d(Ct,f?Re:Oe):J(f?Ne:oe)}}function B(f,g){if(g=="target")return D.marked="keyword",d(Oe)}function F(f,g){if(g=="target")return D.marked="keyword",d(Re)}function Ie(f){return f==":"?d(ue,Le):J(Oe,Te(";"),ue)}function ae(f){if(f=="variable")return D.marked="property",d()}function Se(f,g){if(f=="async")return D.marked="property",d(Se);if(f=="variable"||D.style=="keyword"){if(D.marked="property",g=="get"||g=="set")return d(he);var A;return _&&D.state.fatArrowAt==D.stream.start&&(A=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+A[0].length),d(Be)}else{if(f=="number"||f=="string")return D.marked=V?"property":D.style+" property",d(Be);if(f=="jsonld-keyword")return d(Be);if(_&&y(g))return D.marked="keyword",d(Se);if(f=="[")return d(oe,or,Te("]"),Be);if(f=="spread")return d(Ne,Be);if(g=="*")return D.marked="keyword",d(Se);if(f==":")return J(Be)}}function he(f){return f!="variable"?J(Be):(D.marked="property",d(Pt))}function Be(f){if(f==":")return d(Ne);if(f=="(")return J(Pt)}function Me(f,g,A){function W(L,Z){if(A?A.indexOf(L)>-1:L==","){var _e=D.state.lexical;return _e.info=="call"&&(_e.pos=(_e.pos||0)+1),d(function(it,xt){return it==g||xt==g?J():J(f)},W)}return L==g||Z==g?d():A&&A.indexOf(";")>-1?J(f):d(Te(g))}return function(L,Z){return L==g||Z==g?d():J(f,W)}}function Lt(f,g,A){for(var W=3;W"),We);if(f=="quasi")return J(dt,Ot)}function Bn(f){if(f=="=>")return d(We)}function ve(f){return f.match(/[\}\)\]]/)?d():f==","||f==";"?d(ve):J(Qt,ve)}function Qt(f,g){if(f=="variable"||D.style=="keyword")return D.marked="property",d(Qt);if(g=="?"||f=="number"||f=="string")return d(Qt);if(f==":")return d(We);if(f=="[")return d(Te("variable"),br,Te("]"),Qt);if(f=="(")return J(ur,Qt);if(!f.match(/[;\}\)\],]/))return d()}function dt(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(dt):d(We,Ye)}function Ye(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(dt)}function Ze(f,g){return f=="variable"&&D.stream.match(/^\s*[?:]/,!1)||g=="?"?d(Ze):f==":"?d(We):f=="spread"?d(Ze):J(We)}function Ot(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot);if(g=="|"||f=="."||g=="&")return d(We);if(f=="[")return d(We,Te("]"),Ot);if(g=="extends"||g=="implements")return D.marked="keyword",d(We);if(g=="?")return d(We,Te(":"),We)}function Ct(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot)}function Bt(){return J(We,ht)}function ht(f,g){if(g=="=")return d(We)}function Nr(f,g){return g=="enum"?(D.marked="keyword",d(ce)):J(yt,or,Wt,mi)}function yt(f,g){if(_&&y(g))return D.marked="keyword",d(yt);if(f=="variable")return w(g),d();if(f=="spread")return d(yt);if(f=="[")return Lt(ln,"]");if(f=="{")return Lt(ar,"}")}function ar(f,g){return f=="variable"&&!D.stream.match(/^\s*:/,!1)?(w(g),d(Wt)):(f=="variable"&&(D.marked="property"),f=="spread"?d(yt):f=="}"?J():f=="["?d(oe,Te("]"),Te(":"),ar):d(Te(":"),yt,Wt))}function ln(){return J(yt,Wt)}function Wt(f,g){if(g=="=")return d(Ne)}function mi(f){if(f==",")return d(Nr)}function Or(f,g){if(f=="keyword b"&&g=="else")return d(j("form","else"),Le,ue)}function Wn(f,g){if(g=="await")return d(Wn);if(f=="(")return d(j(")"),an,ue)}function an(f){return f=="var"?d(Nr,sr):f=="variable"?d(sr):J(sr)}function sr(f,g){return f==")"?d():f==";"?d(sr):g=="in"||g=="of"?(D.marked="keyword",d(oe,sr)):J(oe,sr)}function Pt(f,g){if(g=="*")return D.marked="keyword",d(Pt);if(f=="variable")return w(g),d(Pt);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,Le,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,Pt)}function ur(f,g){if(g=="*")return D.marked="keyword",d(ur);if(f=="variable")return w(g),d(ur);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,ur)}function _n(f,g){if(f=="keyword"||f=="variable")return D.marked="type",d(_n);if(g=="<")return d(j(">"),Me(Bt,">"),ue)}function _t(f,g){return g=="@"&&d(oe,_t),f=="spread"?d(_t):_&&y(g)?(D.marked="keyword",d(_t)):_&&f=="this"?d(or,Wt):J(yt,or,Wt)}function yi(f,g){return f=="variable"?Pr(f,g):Ht(f,g)}function Pr(f,g){if(f=="variable")return w(g),d(Ht)}function Ht(f,g){if(g=="<")return d(j(">"),Me(Bt,">"),ue,Ht);if(g=="extends"||g=="implements"||_&&f==",")return g=="implements"&&(D.marked="keyword"),d(_?We:oe,Ht);if(f=="{")return d(j("}"),Rt,ue)}function Rt(f,g){if(f=="async"||f=="variable"&&(g=="static"||g=="get"||g=="set"||_&&y(g))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked="keyword",d(Rt);if(f=="variable"||D.style=="keyword")return D.marked="property",d(kr,Rt);if(f=="number"||f=="string")return d(kr,Rt);if(f=="[")return d(oe,or,Te("]"),kr,Rt);if(g=="*")return D.marked="keyword",d(Rt);if(_&&f=="(")return J(ur,Rt);if(f==";"||f==",")return d(Rt);if(f=="}")return d();if(g=="@")return d(oe,Rt)}function kr(f,g){if(g=="!"||g=="?")return d(kr);if(f==":")return d(We,Wt);if(g=="=")return d(Ne);var A=D.state.lexical.prev,W=A&&A.info=="interface";return J(W?ur:Pt)}function Ir(f,g){return g=="*"?(D.marked="keyword",d(Wr,Te(";"))):g=="default"?(D.marked="keyword",d(oe,Te(";"))):f=="{"?d(Me(zr,"}"),Wr,Te(";")):J(Le)}function zr(f,g){if(g=="as")return D.marked="keyword",d(Te("variable"));if(f=="variable")return J(Ne,zr)}function fr(f){return f=="string"?d():f=="("?J(oe):f=="."?J(Oe):J(Br,Gt,Wr)}function Br(f,g){return f=="{"?Lt(Br,"}"):(f=="variable"&&w(g),g=="*"&&(D.marked="keyword"),d(sn))}function Gt(f){if(f==",")return d(Br,Gt)}function sn(f,g){if(g=="as")return D.marked="keyword",d(Br)}function Wr(f,g){if(g=="from")return D.marked="keyword",d(oe)}function Je(f){return f=="]"?d():J(Me(Ne,"]"))}function ce(){return J(j("form"),yt,Te("{"),j("}"),Me(Vt,"}"),ue,ue)}function Vt(){return J(yt,Wt)}function un(f,g){return f.lastType=="operator"||f.lastType==","||q.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function Ft(f,g,A){return g.tokenize==re&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(A||0)))}return{startState:function(f){var g={tokenize:re,lastType:"sof",cc:[],lexical:new fe((f||0)-K,0,"block",!1),localVars:I.localVars,context:I.localVars&&new P(null,null,!1),indented:f||0};return I.globalVars&&typeof I.globalVars=="object"&&(g.globalVars=I.globalVars),g},token:function(f,g){if(f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),de(f,g)),g.tokenize!=se&&f.eatSpace())return null;var A=g.tokenize(f,g);return ke=="comment"?A:(g.lastType=ke=="operator"&&(we=="++"||we=="--")?"incdec":ke,Ee(g,A,ke,we,f))},indent:function(f,g){if(f.tokenize==se||f.tokenize==Ae)return C.Pass;if(f.tokenize!=re)return 0;var A=g&&g.charAt(0),W=f.lexical,L;if(!/^\s*else\b/.test(g))for(var Z=f.cc.length-1;Z>=0;--Z){var _e=f.cc[Z];if(_e==ue)W=W.prev;else if(_e!=Or&&_e!=xe)break}for(;(W.type=="stat"||W.type=="form")&&(A=="}"||(L=f.cc[f.cc.length-1])&&(L==Oe||L==Re)&&!/^[,\.=+\-*:?[\(]/.test(g));)W=W.prev;$&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var it=W.type,xt=A==it;return it=="vardef"?W.indented+(f.lastType=="operator"||f.lastType==","?W.info.length+1:0):it=="form"&&A=="{"?W.indented:it=="form"?W.indented+K:it=="stat"?W.indented+(un(f,g)?$||K:0):W.info=="switch"&&!xt&&I.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(g)?K:2*K):W.align?W.column+(xt?0:1):W.indented+(xt?0:K)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:V,jsonMode:b,expressionAllowed:Ft,skipExpression:function(f){Ee(f,"atom","atom","true",new C.StringStream("",2,null))}}}),C.registerHelper("wordChars","javascript",/[\w$]/),C.defineMIME("text/javascript","javascript"),C.defineMIME("text/ecmascript","javascript"),C.defineMIME("application/javascript","javascript"),C.defineMIME("application/x-javascript","javascript"),C.defineMIME("application/ecmascript","javascript"),C.defineMIME("application/json",{name:"javascript",json:!0}),C.defineMIME("application/x-json",{name:"javascript",json:!0}),C.defineMIME("application/manifest+json",{name:"javascript",json:!0}),C.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),C.defineMIME("text/typescript",{name:"javascript",typescript:!0}),C.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),pa.exports}(function(Et,zt){(function(C){C(It,xa(),ba(),Su)})(function(C){var De={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function I(ie,O,q){var z=ie.current(),X=z.search(O);return X>-1?ie.backUp(z.length-X):z.match(/<\/?$/)&&(ie.backUp(z.length),ie.match(O,!1)||ie.match(z)),q}var K={};function $(ie){var O=K[ie];return O||(K[ie]=new RegExp("\\s+"+ie+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function V(ie,O){var q=ie.match($(O));return q?/^\s*(.*?)\s*$/.exec(q[2])[1]:""}function b(ie,O){return new RegExp((O?"^":"")+"","i")}function N(ie,O){for(var q in ie)for(var z=O[q]||(O[q]=[]),X=ie[q],ke=X.length-1;ke>=0;ke--)z.unshift(X[ke])}function _(ie,O){for(var q=0;q=0;we--)z.script.unshift(["type",ke[we].matches,ke[we].mode]);function te(re,ne){var se=q.token(re,ne.htmlState),Ae=/\btag\b/.test(se),ye;if(Ae&&!/[<>\s\/]/.test(re.current())&&(ye=ne.htmlState.tagName&&ne.htmlState.tagName.toLowerCase())&&z.hasOwnProperty(ye))ne.inTag=ye+" ";else if(ne.inTag&&Ae&&/>$/.test(re.current())){var de=/^([\S]+) (.*)/.exec(ne.inTag);ne.inTag=null;var ze=re.current()==">"&&_(z[de[1]],de[2]),fe=C.getMode(ie,ze),H=b(de[1],!0),Ee=b(de[1],!1);ne.token=function(D,J){return D.match(H,!1)?(J.token=te,J.localState=J.localMode=null,null):I(D,Ee,J.localMode.token(D,J.localState))},ne.localMode=fe,ne.localState=C.startState(fe,q.indent(ne.htmlState,"",""))}else ne.inTag&&(ne.inTag+=re.current(),re.eol()&&(ne.inTag+=" "));return se}return{startState:function(){var re=C.startState(q);return{token:te,inTag:null,localMode:null,localState:null,htmlState:re}},copyState:function(re){var ne;return re.localState&&(ne=C.copyState(re.localMode,re.localState)),{token:re.token,inTag:re.inTag,localMode:re.localMode,localState:ne,htmlState:C.copyState(q,re.htmlState)}},token:function(re,ne){return ne.token(re,ne)},indent:function(re,ne,se){return!re.localMode||/^\s*<\//.test(ne)?q.indent(re.htmlState,ne,se):re.localMode.indent?re.localMode.indent(re.localState,ne,se):C.Pass},innerMode:function(re){return{state:re.localState||re.htmlState,mode:re.localMode||q}}}},"xml","javascript","css"),C.defineMIME("text/html","htmlmixed")})})();ba();(function(Et,zt){(function(C){C(It)})(function(C){function De(N){return new RegExp("^(("+N.join(")|(")+"))\\b")}var I=De(["and","or","not","is"]),K=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],$=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];C.registerHelper("hintWords","python",K.concat($).concat(["exec","print"]));function V(N){return N.scopes[N.scopes.length-1]}C.defineMode("python",function(N,_){for(var ie="error",O=_.delimiters||_.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,q=[_.singleOperators,_.doubleOperators,_.doubleDelimiters,_.tripleDelimiters,_.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],z=0;zy?H(w):P0&&D(S,w)&&(le+=" "+ie),le}}return de(S,w)}function de(S,w,m){if(S.eatSpace())return null;if(!m&&S.match(/^#.*/))return"comment";if(S.match(/^[0-9\.]/,!1)){var y=!1;if(S.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),S.match(/^[\d_]+\.\d*/)&&(y=!0),S.match(/^\.\d+/)&&(y=!0),y)return S.eat(/J/i),"number";var P=!1;if(S.match(/^0x[0-9a-f_]+/i)&&(P=!0),S.match(/^0b[01_]+/i)&&(P=!0),S.match(/^0o[0-7_]+/i)&&(P=!0),S.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(S.eat(/J/i),P=!0),S.match(/^0(?![\dx])/i)&&(P=!0),P)return S.eat(/L/i),"number"}if(S.match(ne)){var le=S.current().toLowerCase().indexOf("f")!==-1;return le?(w.tokenize=ze(S.current(),w.tokenize),w.tokenize(S,w)):(w.tokenize=fe(S.current(),w.tokenize),w.tokenize(S,w))}for(var p=0;p=0;)S=S.substr(1);var m=S.length==1,y="string";function P(p){return function(c,Y){var xe=de(c,Y,!0);return xe=="punctuation"&&(c.current()=="{"?Y.tokenize=P(p+1):c.current()=="}"&&(p>1?Y.tokenize=P(p-1):Y.tokenize=le)),xe}}function le(p,c){for(;!p.eol();)if(p.eatWhile(/[^'"\{\}\\]/),p.eat("\\")){if(p.next(),m&&p.eol())return y}else{if(p.match(S))return c.tokenize=w,y;if(p.match("{{"))return y;if(p.match("{",!1))return c.tokenize=P(0),p.current()?y:c.tokenize(p,c);if(p.match("}}"))return y;if(p.match("}"))return ie;p.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;c.tokenize=w}return y}return le.isString=!0,le}function fe(S,w){for(;"rubf".indexOf(S.charAt(0).toLowerCase())>=0;)S=S.substr(1);var m=S.length==1,y="string";function P(le,p){for(;!le.eol();)if(le.eatWhile(/[^'"\\]/),le.eat("\\")){if(le.next(),m&&le.eol())return y}else{if(le.match(S))return p.tokenize=w,y;le.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;p.tokenize=w}return y}return P.isString=!0,P}function H(S){for(;V(S).type!="py";)S.scopes.pop();S.scopes.push({offset:V(S).offset+N.indentUnit,type:"py",align:null})}function Ee(S,w,m){var y=S.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:S.column()+1;w.scopes.push({offset:w.indent+X,type:m,align:y})}function D(S,w){for(var m=S.indentation();w.scopes.length>1&&V(w).offset>m;){if(V(w).type!="py")return!0;w.scopes.pop()}return V(w).offset!=m}function J(S,w){S.sol()&&(w.beginningOfLine=!0,w.dedent=!1);var m=w.tokenize(S,w),y=S.current();if(w.beginningOfLine&&y=="@")return S.match(re,!1)?"meta":te?"operator":ie;if(/\S/.test(y)&&(w.beginningOfLine=!1),(m=="variable"||m=="builtin")&&w.lastToken=="meta"&&(m="meta"),(y=="pass"||y=="return")&&(w.dedent=!0),y=="lambda"&&(w.lambda=!0),y==":"&&!w.lambda&&V(w).type=="py"&&S.match(/^\s*(?:#|$)/,!1)&&H(w),y.length==1&&!/string|comment/.test(m)){var P="[({".indexOf(y);if(P!=-1&&Ee(S,w,"])}".slice(P,P+1)),P="])}".indexOf(y),P!=-1)if(V(w).type==y)w.indent=w.scopes.pop().offset-X;else return ie}return w.dedent&&S.eol()&&V(w).type=="py"&&w.scopes.length>1&&w.scopes.pop(),m}var d={startState:function(S){return{tokenize:ye,scopes:[{offset:S||0,type:"py",align:null}],indent:S||0,lastToken:null,lambda:!1,dedent:0}},token:function(S,w){var m=w.errorToken;m&&(w.errorToken=!1);var y=J(S,w);return y&&y!="comment"&&(w.lastToken=y=="keyword"||y=="punctuation"?S.current():y),y=="punctuation"&&(y=null),S.eol()&&w.lambda&&(w.lambda=!1),m?y+" "+ie:y},indent:function(S,w){if(S.tokenize!=ye)return S.tokenize.isString?C.Pass:0;var m=V(S),y=m.type==w.charAt(0)||m.type=="py"&&!S.dedent&&/^(else:|elif |except |finally:)/.test(w);return m.align!=null?m.align-(y?1:0):m.offset-(y?X:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return d}),C.defineMIME("text/x-python","python");var b=function(N){return N.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:b("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})();(function(Et,zt){(function(C){C(It)})(function(C){function De(m,y,P,le,p,c){this.indented=m,this.column=y,this.type=P,this.info=le,this.align=p,this.prev=c}function I(m,y,P,le){var p=m.indented;return m.context&&m.context.type=="statement"&&P!="statement"&&(p=m.context.indented),m.context=new De(p,y,P,le,null,m.context)}function K(m){var y=m.context.type;return(y==")"||y=="]"||y=="}")&&(m.indented=m.context.indented),m.context=m.context.prev}function $(m,y,P){if(y.prevToken=="variable"||y.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(m.string.slice(0,P))||y.typeAtEndOfLine&&m.column()==m.indentation())return!0}function V(m){for(;;){if(!m||m.type=="top")return!0;if(m.type=="}"&&m.prev.info!="namespace")return!1;m=m.prev}}C.defineMode("clike",function(m,y){var P=m.indentUnit,le=y.statementIndentUnit||P,p=y.dontAlignCalls,c=y.keywords||{},Y=y.types||{},xe=y.builtin||{},j=y.blockKeywords||{},ue=y.defKeywords||{},Te=y.atoms||{},Le=y.hooks||{},be=y.multiLineStrings,oe=y.indentStatements!==!1,Ne=y.indentSwitch!==!1,qe=y.namespaceSeparator,Ve=y.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ct=y.numberStart||/[\d\.]/,Oe=y.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Re=y.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=y.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=y.isReservedIdentifier||!1,ge,Pe;function T(ae,Se){var he=ae.next();if(Le[he]){var Be=Le[he](ae,Se);if(Be!==!1)return Be}if(he=='"'||he=="'")return Se.tokenize=B(he),Se.tokenize(ae,Se);if(ct.test(he)){if(ae.backUp(1),ae.match(Oe))return"number";ae.next()}if(Ve.test(he))return ge=he,null;if(he=="/"){if(ae.eat("*"))return Se.tokenize=F,F(ae,Se);if(ae.eat("/"))return ae.skipToEnd(),"comment"}if(Re.test(he)){for(;!ae.match(/^\/[\/*]/,!1)&&ae.eat(Re););return"operator"}if(ae.eatWhile(Ue),qe)for(;ae.match(qe);)ae.eatWhile(Ue);var Me=ae.current();return N(c,Me)?(N(j,Me)&&(ge="newstatement"),N(ue,Me)&&(Pe=!0),"keyword"):N(Y,Me)?"type":N(xe,Me)||et&&et(Me)?(N(j,Me)&&(ge="newstatement"),"builtin"):N(Te,Me)?"atom":"variable"}function B(ae){return function(Se,he){for(var Be=!1,Me,Lt=!1;(Me=Se.next())!=null;){if(Me==ae&&!Be){Lt=!0;break}Be=!Be&&Me=="\\"}return(Lt||!(Be||be))&&(he.tokenize=null),"string"}}function F(ae,Se){for(var he=!1,Be;Be=ae.next();){if(Be=="/"&&he){Se.tokenize=null;break}he=Be=="*"}return"comment"}function Ie(ae,Se){y.typeFirstDefinitions&&ae.eol()&&V(Se.context)&&(Se.typeAtEndOfLine=$(ae,Se,ae.pos))}return{startState:function(ae){return{tokenize:null,context:new De((ae||0)-P,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(ae,Se){var he=Se.context;if(ae.sol()&&(he.align==null&&(he.align=!1),Se.indented=ae.indentation(),Se.startOfLine=!0),ae.eatSpace())return Ie(ae,Se),null;ge=Pe=null;var Be=(Se.tokenize||T)(ae,Se);if(Be=="comment"||Be=="meta")return Be;if(he.align==null&&(he.align=!0),ge==";"||ge==":"||ge==","&&ae.match(/^\s*(?:\/\/.*)?$/,!1))for(;Se.context.type=="statement";)K(Se);else if(ge=="{")I(Se,ae.column(),"}");else if(ge=="[")I(Se,ae.column(),"]");else if(ge=="(")I(Se,ae.column(),")");else if(ge=="}"){for(;he.type=="statement";)he=K(Se);for(he.type=="}"&&(he=K(Se));he.type=="statement";)he=K(Se)}else ge==he.type?K(Se):oe&&((he.type=="}"||he.type=="top")&&ge!=";"||he.type=="statement"&&ge=="newstatement")&&I(Se,ae.column(),"statement",ae.current());if(Be=="variable"&&(Se.prevToken=="def"||y.typeFirstDefinitions&&$(ae,Se,ae.start)&&V(Se.context)&&ae.match(/^\s*\(/,!1))&&(Be="def"),Le.token){var Me=Le.token(ae,Se,Be);Me!==void 0&&(Be=Me)}return Be=="def"&&y.styleDefs===!1&&(Be="variable"),Se.startOfLine=!1,Se.prevToken=Pe?"def":Be||ge,Ie(ae,Se),Be},indent:function(ae,Se){if(ae.tokenize!=T&&ae.tokenize!=null||ae.typeAtEndOfLine&&V(ae.context))return C.Pass;var he=ae.context,Be=Se&&Se.charAt(0),Me=Be==he.type;if(he.type=="statement"&&Be=="}"&&(he=he.prev),y.dontIndentStatements)for(;he.type=="statement"&&y.dontIndentStatements.test(he.info);)he=he.prev;if(Le.indent){var Lt=Le.indent(ae,he,Se,P);if(typeof Lt=="number")return Lt}var Nt=he.prev&&he.prev.info=="switch";if(y.allmanIndentation&&/[{(]/.test(Be)){for(;he.type!="top"&&he.type!="}";)he=he.prev;return he.indented}return he.type=="statement"?he.indented+(Be=="{"?0:le):he.align&&(!p||he.type!=")")?he.column+(Me?0:1):he.type==")"&&!Me?he.indented+le:he.indented+(Me?0:P)+(!Me&&Nt&&!/^(?:case|default)\b/.test(Se)?P:0)},electricInput:Ne?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function b(m){for(var y={},P=m.split(" "),le=0;le!?|\/#:@]/,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return m.match('""')?(y.tokenize=D,y.tokenize(m,y)):!1},"'":function(m){return m.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(m,y){var P=y.context;return P.type=="}"&&P.align&&m.eat(">")?(y.context=new De(P.indented,P.column,P.type,P.info,null,P.prev),"operator"):!1},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function d(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!m&&!le&&y.match('"')){c=!0;break}if(m&&y.match('"""')){c=!0;break}p=y.next(),!le&&p=="$"&&y.match("{")&&y.skipTo("}"),le=!le&&p=="\\"&&!m}return(c||!m)&&(P.tokenize=null),"string"}}Ee("text/x-kotlin",{name:"clike",keywords:b("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:b("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:b("catch class do else finally for if where try while enum"),defKeywords:b("class val var object interface fun"),atoms:b("true false null this"),hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},"*":function(m,y){return y.prevToken=="."?"variable":"operator"},'"':function(m,y){return y.tokenize=d(m.match('""')),y.tokenize(m,y)},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1},indent:function(m,y,P,le){var p=P&&P.charAt(0);if((m.prevToken=="}"||m.prevToken==")")&&P=="")return m.indented;if(m.prevToken=="operator"&&P!="}"&&m.context.type!="}"||m.prevToken=="variable"&&p=="."||(m.prevToken=="}"||m.prevToken==")")&&p==".")return le*2+y.indented;if(y.align&&y.type=="}")return y.indented+(m.context.type==(P||"").charAt(0)?0:le)}},modeProps:{closeBrackets:{triples:'"'}}}),Ee(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-nesc",{name:"clike",keywords:b(_+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ke,blockKeywords:b(te),atoms:b("null true false"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec",{name:"clike",keywords:b(_+" "+O),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:b(re+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec++",{name:"clike",keywords:b(_+" "+O+" "+ie),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:b(re+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se,u:de,U:de,L:de,R:de,0:ye,1:ye,2:ye,3:ye,4:ye,5:ye,6:ye,7:ye,8:ye,9:ye,token:function(m,y,P){if(P=="variable"&&m.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&ze(m.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Ee("text/x-squirrel",{name:"clike",keywords:b("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ke,blockKeywords:b("case catch class else for foreach if switch try while"),defKeywords:b("function local class"),typeFirstDefinitions:!0,atoms:b("true false null"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}});var S=null;function w(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!le&&y.match('"')&&(m=="single"||y.match('""'))){c=!0;break}if(!le&&y.match("``")){S=w(m),c=!0;break}p=y.next(),le=m=="single"&&!le&&p=="\\"}return c&&(P.tokenize=null),"string"}}Ee("text/x-ceylon",{name:"clike",keywords:b("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(m){var y=m.charAt(0);return y===y.toUpperCase()&&y!==y.toLowerCase()},blockKeywords:b("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:b("class dynamic function interface module object package value"),builtin:b("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:b("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return y.tokenize=w(m.match('""')?"triple":"single"),y.tokenize(m,y)},"`":function(m,y){return!S||!m.match("`")?!1:(y.tokenize=S,S=null,y.tokenize(m,y))},"'":function(m){return m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(m,y,P){if((P=="variable"||P=="type")&&y.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})();var va={exports:{}},ma;function Tu(){return ma||(ma=1,function(Et,zt){(function(C){C(It)})(function(C){C.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De-1&&K.substring(b+1,K.length);if(N)return C.findModeByExtension(N)},C.findModeByName=function(K){K=K.toLowerCase();for(var $=0;$` "'(~:]+/,ke=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,we=/^\s*\[[^\]]+?\]:.*$/,te=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,re=" ";function ne(p,c,Y){return c.f=c.inline=Y,Y(p,c)}function se(p,c,Y){return c.f=c.block=Y,Y(p,c)}function Ae(p){return!p||!/\S/.test(p.string)}function ye(p){if(p.linkTitle=!1,p.linkHref=!1,p.linkText=!1,p.em=!1,p.strong=!1,p.strikethrough=!1,p.quote=0,p.indentedCode=!1,p.f==ze){var c=$;if(!c){var Y=C.innerMode(K,p.htmlState);c=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}c&&(p.f=D,p.block=de,p.htmlState=null)}return p.trailingSpace=0,p.trailingSpaceNewLine=!1,p.prevLine=p.thisLine,p.thisLine={stream:null},null}function de(p,c){var Y=p.column()===c.indentation,xe=Ae(c.prevLine.stream),j=c.indentedCode,ue=c.prevLine.hr,Te=c.list!==!1,Le=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var be=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Te)){for(c.list=null;be=4&&(j||c.prevLine.fencedCodeEnd||c.prevLine.header||xe))return p.skipToEnd(),c.indentedCode=!0,b.code;if(p.eatSpace())return null;if(Y&&c.indentation<=Le&&(qe=p.match(q))&&qe[1].length<=6)return c.quote=0,c.header=qe[1].length,c.thisLine.header=!0,I.highlightFormatting&&(c.formatting="header"),c.f=c.inline,H(c);if(c.indentation<=Le&&p.eat(">"))return c.quote=Y?1:c.quote+1,I.highlightFormatting&&(c.formatting="quote"),p.eatSpace(),H(c);if(!Ne&&!c.setext&&Y&&c.indentation<=Le&&(qe=p.match(ie))){var Ve=qe[1]?"ol":"ul";return c.indentation=be+p.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,I.taskLists&&p.match(O,!1)&&(c.taskList=!0),c.f=c.inline,I.highlightFormatting&&(c.formatting=["list","list-"+Ve]),H(c)}else{if(Y&&c.indentation<=Le&&(qe=p.match(ke,!0)))return c.quote=0,c.fencedEndRE=new RegExp(qe[1]+"+ *$"),c.localMode=I.fencedCodeBlockHighlighting&&V(qe[2]||I.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=C.startState(c.localMode)),c.f=c.block=fe,I.highlightFormatting&&(c.formatting="code-block"),c.code=-1,H(c);if(c.setext||(!oe||!Te)&&!c.quote&&c.list===!1&&!c.code&&!Ne&&!we.test(p.string)&&(qe=p.lookAhead(1))&&(qe=qe.match(z)))return c.setext?(c.header=c.setext,c.setext=0,p.skipToEnd(),I.highlightFormatting&&(c.formatting="header")):(c.header=qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,H(c);if(Ne)return p.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,b.hr;if(p.peek()==="[")return ne(p,c,m)}return ne(p,c,c.inline)}function ze(p,c){var Y=K.token(p,c.htmlState);if(!$){var xe=C.innerMode(K,c.htmlState);(xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText||c.md_inside&&p.current().indexOf(">")>-1)&&(c.f=D,c.block=de,c.htmlState=null)}return Y}function fe(p,c){var Y=c.listStack[c.listStack.length-1]||0,xe=c.indentation=p.quote?c.push(b.formatting+"-"+p.formatting[Y]+"-"+p.quote):c.push("error"))}if(p.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(p.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(p.linkHref?c.push(b.linkHref,"url"):(p.strong&&c.push(b.strong),p.em&&c.push(b.em),p.strikethrough&&c.push(b.strikethrough),p.emoji&&c.push(b.emoji),p.linkText&&c.push(b.linkText),p.code&&c.push(b.code),p.image&&c.push(b.image),p.imageAltText&&c.push(b.imageAltText,"link"),p.imageMarker&&c.push(b.imageMarker)),p.header&&c.push(b.header,b.header+"-"+p.header),p.quote&&(c.push(b.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=p.quote?c.push(b.quote+"-"+p.quote):c.push(b.quote+"-"+I.maxBlockquoteDepth)),p.list!==!1){var xe=(p.listStack.length-1)%3;xe?xe===1?c.push(b.list2):c.push(b.list3):c.push(b.list1)}return p.trailingSpaceNewLine?c.push("trailing-space-new-line"):p.trailingSpace&&c.push("trailing-space-"+(p.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Ee(p,c){if(p.match(X,!0))return H(c)}function D(p,c){var Y=c.text(p,c);if(typeof Y<"u")return Y;if(c.list)return c.list=null,H(c);if(c.taskList){var xe=p.match(O,!0)[1]===" ";return xe?c.taskOpen=!0:c.taskClosed=!0,I.highlightFormatting&&(c.formatting="task"),c.taskList=!1,H(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&p.match(/^#+$/,!0))return I.highlightFormatting&&(c.formatting="header"),H(c);var j=p.next();if(c.linkTitle){c.linkTitle=!1;var ue=j;j==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(p.match(new RegExp(Te),!0))return b.linkHref}if(j==="`"){var Le=c.formatting;I.highlightFormatting&&(c.formatting="code"),p.eatWhile("`");var be=p.current().length;if(c.code==0&&(!c.quote||be==1))return c.code=be,H(c);if(be==c.code){var oe=H(c);return c.code=0,oe}else return c.formatting=Le,H(c)}else if(c.code)return H(c);if(j==="\\"&&(p.next(),I.highlightFormatting)){var Ne=H(c),qe=b.formatting+"-escape";return Ne?Ne+" "+qe:qe}if(j==="!"&&p.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="["&&c.imageMarker&&p.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="]"&&c.imageAltText){I.highlightFormatting&&(c.formatting="image");var Ne=H(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=d,Ne}if(j==="["&&!c.image)return c.linkText&&p.match(/^.*?\]/)||(c.linkText=!0,I.highlightFormatting&&(c.formatting="link")),H(c);if(j==="]"&&c.linkText){I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return c.linkText=!1,c.inline=c.f=p.match(/\(.*?\)| ?\[.*?\]/,!1)?d:D,Ne}if(j==="<"&&p.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkInline}if(j==="<"&&p.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkEmail}if(I.xml&&j==="<"&&p.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=p.string.indexOf(">",p.pos);if(Ve!=-1){var ct=p.string.substring(p.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ct)&&(c.md_inside=!0)}return p.backUp(1),c.htmlState=C.startState(K),se(p,c,ze)}if(I.xml&&j==="<"&&p.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(j==="*"||j==="_"){for(var Oe=1,Re=p.pos==1?" ":p.string.charAt(p.pos-2);Oe<3&&p.eat(j);)Oe++;var Ue=p.peek()||" ",et=!/\s/.test(Ue)&&(!te.test(Ue)||/\s/.test(Re)||te.test(Re)),ge=!/\s/.test(Re)&&(!te.test(Re)||/\s/.test(Ue)||te.test(Ue)),Pe=null,T=null;if(Oe%2&&(!c.em&&et&&(j==="*"||!ge||te.test(Re))?Pe=!0:c.em==j&&ge&&(j==="*"||!et||te.test(Ue))&&(Pe=!1)),Oe>1&&(!c.strong&&et&&(j==="*"||!ge||te.test(Re))?T=!0:c.strong==j&&ge&&(j==="*"||!et||te.test(Ue))&&(T=!1)),T!=null||Pe!=null){I.highlightFormatting&&(c.formatting=Pe==null?"strong":T==null?"em":"strong em"),Pe===!0&&(c.em=j),T===!0&&(c.strong=j);var oe=H(c);return Pe===!1&&(c.em=!1),T===!1&&(c.strong=!1),oe}}else if(j===" "&&(p.eat("*")||p.eat("_"))){if(p.peek()===" ")return H(c);p.backUp(1)}if(I.strikethrough){if(j==="~"&&p.eatWhile(j)){if(c.strikethrough){I.highlightFormatting&&(c.formatting="strikethrough");var oe=H(c);return c.strikethrough=!1,oe}else if(p.match(/^[^\s]/,!1))return c.strikethrough=!0,I.highlightFormatting&&(c.formatting="strikethrough"),H(c)}else if(j===" "&&p.match("~~",!0)){if(p.peek()===" ")return H(c);p.backUp(2)}}if(I.emoji&&j===":"&&p.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,I.highlightFormatting&&(c.formatting="emoji");var B=H(c);return c.emoji=!1,B}return j===" "&&(p.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),H(c)}function J(p,c){var Y=p.next();if(Y===">"){c.f=c.inline=D,I.highlightFormatting&&(c.formatting="link");var xe=H(c);return xe?xe+=" ":xe="",xe+b.linkInline}return p.match(/^[^>]+/,!0),b.linkInline}function d(p,c){if(p.eatSpace())return null;var Y=p.next();return Y==="("||Y==="["?(c.f=c.inline=w(Y==="("?")":"]"),I.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,H(c)):"error"}var S={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(p){return function(c,Y){var xe=c.next();if(xe===p){Y.f=Y.inline=D,I.highlightFormatting&&(Y.formatting="link-string");var j=H(Y);return Y.linkHref=!1,j}return c.match(S[p]),Y.linkHref=!0,H(Y)}}function m(p,c){return p.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=y,p.next(),I.highlightFormatting&&(c.formatting="link"),c.linkText=!0,H(c)):ne(p,c,D)}function y(p,c){if(p.match("]:",!0)){c.f=c.inline=P,I.highlightFormatting&&(c.formatting="link");var Y=H(c);return c.linkText=!1,Y}return p.match(/^([^\]\\]|\\.)+/,!0),b.linkText}function P(p,c){return p.eatSpace()?null:(p.match(/^[^\s]+/,!0),p.peek()===void 0?c.linkTitle=!0:p.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=D,b.linkHref+" url")}var le={startState:function(){return{f:de,prevLine:{stream:null},thisLine:{stream:null},block:de,htmlState:null,indentation:0,inline:D,text:Ee,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(p){return{f:p.f,prevLine:p.prevLine,thisLine:p.thisLine,block:p.block,htmlState:p.htmlState&&C.copyState(K,p.htmlState),indentation:p.indentation,localMode:p.localMode,localState:p.localMode?C.copyState(p.localMode,p.localState):null,inline:p.inline,text:p.text,formatting:!1,linkText:p.linkText,linkTitle:p.linkTitle,linkHref:p.linkHref,code:p.code,em:p.em,strong:p.strong,strikethrough:p.strikethrough,emoji:p.emoji,header:p.header,setext:p.setext,hr:p.hr,taskList:p.taskList,list:p.list,listStack:p.listStack.slice(0),quote:p.quote,indentedCode:p.indentedCode,trailingSpace:p.trailingSpace,trailingSpaceNewLine:p.trailingSpaceNewLine,md_inside:p.md_inside,fencedEndRE:p.fencedEndRE}},token:function(p,c){if(c.formatting=!1,p!=c.thisLine.stream){if(c.header=0,c.hr=!1,p.match(/^\s*$/,!0))return ye(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:p},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=ze)){var Y=p.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(c.indentation=Y,c.indentationDiff=null,Y>0)return null}}return c.f(p,c)},innerMode:function(p){return p.block==ze?{state:p.htmlState,mode:K}:p.localState?{state:p.localState,mode:p.localMode}:{state:p,mode:le}},indent:function(p,c,Y){return p.block==ze&&K.indent?K.indent(p.htmlState,c,Y):p.localState&&p.localMode.indent?p.localMode.indent(p.localState,c,Y):C.Pass},blankLine:ye,getType:H,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return le},"xml"),C.defineMIME("text/markdown","markdown"),C.defineMIME("text/x-markdown","markdown")})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineOption("placeholder","",function(N,_,ie){var O=ie&&ie!=C.Init;if(_&&!O)N.on("blur",$),N.on("change",V),N.on("swapDoc",V),C.on(N.getInputField(),"compositionupdate",N.state.placeholderCompose=function(){K(N)}),V(N);else if(!_&&O){N.off("blur",$),N.off("change",V),N.off("swapDoc",V),C.off(N.getInputField(),"compositionupdate",N.state.placeholderCompose),De(N);var q=N.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}_&&!N.hasFocus()&&$(N)});function De(N){N.state.placeholder&&(N.state.placeholder.parentNode.removeChild(N.state.placeholder),N.state.placeholder=null)}function I(N){De(N);var _=N.state.placeholder=document.createElement("pre");_.style.cssText="height: 0; overflow: visible",_.style.direction=N.getOption("direction"),_.className="CodeMirror-placeholder CodeMirror-line-like";var ie=N.getOption("placeholder");typeof ie=="string"&&(ie=document.createTextNode(ie)),_.appendChild(ie),N.display.lineSpace.insertBefore(_,N.display.lineSpace.firstChild)}function K(N){setTimeout(function(){var _=!1;if(N.lineCount()==1){var ie=N.getInputField();_=ie.nodeName=="TEXTAREA"?!N.getLine(0).length:!/[^\u200b]/.test(ie.querySelector(".CodeMirror-line").textContent)}_?I(N):De(N)},20)}function $(N){b(N)&&I(N)}function V(N){var _=N.getWrapperElement(),ie=b(N);_.className=_.className.replace(" CodeMirror-empty","")+(ie?" CodeMirror-empty":""),ie?I(N):De(N)}function b(N){return N.lineCount()===1&&N.getLine(0)===""}})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineSimpleMode=function(O,q){C.defineMode(O,function(z){return C.simpleMode(z,q)})},C.simpleMode=function(O,q){De(q,"start");var z={},X=q.meta||{},ke=!1;for(var we in q)if(we!=X&&q.hasOwnProperty(we))for(var te=z[we]=[],re=q[we],ne=0;ne2&&se.token&&typeof se.token!="string"){for(var de=2;de-1)return C.Pass;var we=z.indent.length-1,te=O[z.state];e:for(;;){for(var re=0;re$.keyCol)return K.skipToEnd(),"string";if($.literal&&($.literal=!1),K.sol()){if($.keyCol=0,$.pair=!1,$.pairStart=!1,K.match("---")||K.match("..."))return"def";if(K.match(/\s*-\s+/))return"meta"}if(K.match(/^(\{|\}|\[|\])/))return V=="{"?$.inlinePairs++:V=="}"?$.inlinePairs--:V=="["?$.inlineList++:$.inlineList--,"meta";if($.inlineList>0&&!b&&V==",")return K.next(),"meta";if($.inlinePairs>0&&!b&&V==",")return $.keyCol=0,$.pair=!1,$.pairStart=!1,K.next(),"meta";if($.pairStart){if(K.match(/^\s*(\||\>)\s*/))return $.literal=!0,"meta";if(K.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if($.inlinePairs==0&&K.match(/^\s*-?[0-9\.\,]+\s?$/)||$.inlinePairs>0&&K.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(K.match(I))return"keyword"}return!$.pair&&K.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?($.pair=!0,$.keyCol=K.indentation(),"atom"):$.pair&&K.match(/^:\s*/)?($.pairStart=!0,"meta"):($.pairStart=!1,$.escaped=V=="\\",K.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),C.defineMIME("text/x-yaml","yaml"),C.defineMIME("text/yaml","yaml")})})();export{Cu as default}; diff --git a/feat/inbound-tx-notifications/trace/assets/defaultSettingsView-CxUo6zd3.js b/feat/inbound-tx-notifications/trace/assets/defaultSettingsView-CxUo6zd3.js new file mode 100644 index 00000000..6ffe8562 --- /dev/null +++ b/feat/inbound-tx-notifications/trace/assets/defaultSettingsView-CxUo6zd3.js @@ -0,0 +1,243 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-aLkSUGpW.js","../codeMirrorModule.ez37Vkbh.css"])))=>i.map(i=>d[i]); +var Y0=Object.defineProperty;var Z0=(t,e,n)=>e in t?Y0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var W=(t,e,n)=>Z0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var mT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ev(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fh={exports:{}},ll={},zh={exports:{}},z={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var pi=Symbol.for("react.element"),tv=Symbol.for("react.portal"),nv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),sv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),lv=Symbol.for("react.forward_ref"),av=Symbol.for("react.suspense"),cv=Symbol.for("react.memo"),uv=Symbol.for("react.lazy"),jf=Symbol.iterator;function fv(t){return t===null||typeof t!="object"?null:(t=jf&&t[jf]||t["@@iterator"],typeof t=="function"?t:null)}var Bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uh=Object.assign,Hh={};function Xr(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}Xr.prototype.isReactComponent={};Xr.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Xr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Vh(){}Vh.prototype=Xr.prototype;function Xc(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}var Gc=Xc.prototype=new Vh;Gc.constructor=Xc;Uh(Gc,Xr.prototype);Gc.isPureReactComponent=!0;var Mf=Array.isArray,qh=Object.prototype.hasOwnProperty,Jc={current:null},Wh={key:!0,ref:!0,__self:!0,__source:!0};function Kh(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)qh.call(e,r)&&!Wh.hasOwnProperty(r)&&(s[r]=e[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1{let o=!1;return t().then(l=>{o||i(l)}),()=>{o=!0}},e),s}function Xn(){const t=tt.useRef(null),[e,n]=tt.useState(new DOMRect(0,0,10,10));return tt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const s=r.getBoundingClientRect();n(new DOMRect(0,0,s.width,s.height));const i=new ResizeObserver(o=>{const l=o[o.length-1];l&&l.contentRect&&n(l.contentRect)});return i.observe(r),()=>i.disconnect()},[t]),[e,t]}function Pe(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function kv(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Xh(t,e,n,r,s){let i=0,o=s!==void 0?s:t.length;for(;i>1;n(e,t[l])>=0?i=l+1:o=l}return o}function $f(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Dr(t,e){t&&(e=jn.getObject(t,e));const[n,r]=tt.useState(e),s=tt.useCallback(i=>{t?jn.setObject(t,i):r(i)},[t,r]);return tt.useEffect(()=>{if(t){const i=()=>r(jn.getObject(t,e));return jn.onChangeEmitter.addEventListener(t,i),()=>jn.onChangeEmitter.removeEventListener(t,i)}},[e,t]),[n,s]}class Ev{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const jn=new Ev;function le(...t){return t.filter(Boolean).join(" ")}function Gh(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Pf="\\u0000-\\u0020\\u007f-\\u009f",Jh=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Pf+'"]{2,}[^\\s'+Pf+`"')}\\],:;.!?]`,"ug");function Tv(){const[t,e]=tt.useState(!1),n=tt.useCallback(()=>{const r=[];return e(s=>(r.push(setTimeout(()=>e(!1),1e3)),s?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function gT(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1);const t=jn.getString("theme","light-mode"),e=window.matchMedia("(prefers-color-scheme: dark)");(t==="dark-mode"||e.matches)&&document.body.classList.add("dark-mode")}const Zc=new Set;function bv(){const t=za(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),jn.setString("theme",e);for(const n of Zc)n(e)}function yT(t){Zc.add(t)}function vT(t){Zc.delete(t)}function za(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Nv(){const[t,e]=tt.useState(za()==="dark-mode");return[t,n=>{za()==="dark-mode"!==n&&bv(),e(n)}]}var Yh={exports:{}},st={},Zh={exports:{}},ep={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(t){function e(j,$){var D=j.length;j.push($);e:for(;0>>1,ce=j[q];if(0>>1;qs(as,D))Cts(ke,as)?(j[q]=ke,j[Ct]=D,q=Ct):(j[q]=as,j[Ie]=D,q=Ie);else if(Cts(ke,D))j[q]=ke,j[Ct]=D,q=Ct;else break e}}return $}function s(j,$){var D=j.sortIndex-$.sortIndex;return D!==0?D:j.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],c=[],u=1,f=null,d=3,h=!1,v=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=j)r(c),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(c)}}function x(j){if(m=!1,S(j),!v)if(n(a)!==null)v=!0,Be(_);else{var $=n(c);$!==null&&Le(x,$.startTime-j)}}function _(j,$){v=!1,m&&(m=!1,y(E),E=-1),h=!0;var D=d;try{for(S($),f=n(a);f!==null&&(!(f.expirationTime>$)||j&&!L());){var q=f.callback;if(typeof q=="function"){f.callback=null,d=f.priorityLevel;var ce=q(f.expirationTime<=$);$=t.unstable_now(),typeof ce=="function"?f.callback=ce:f===n(a)&&r(a),S($)}else r(a);f=n(a)}if(f!==null)var Rt=!0;else{var Ie=n(c);Ie!==null&&Le(x,Ie.startTime-$),Rt=!1}return Rt}finally{f=null,d=D,h=!1}}var T=!1,b=null,E=-1,k=5,A=-1;function L(){return!(t.unstable_now()-Aj||125q?(j.sortIndex=D,e(c,j),n(a)===null&&j===n(c)&&(m?(y(E),E=-1):m=!0,Le(x,D-q))):(j.sortIndex=ce,e(a,j),v||h||(v=!0,Be(_))),j},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(j){var $=d;return function(){var D=d;d=$;try{return j.apply(this,arguments)}finally{d=D}}}})(ep);Zh.exports=ep;var Cv=Zh.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tp=N,rt=Cv;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ba=Object.prototype.hasOwnProperty,Av=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rf={},Df={};function Lv(t){return Ba.call(Df,t)?!0:Ba.call(Rf,t)?!1:Av.test(t)?Df[t]=!0:(Rf[t]=!0,!1)}function Iv(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jv(t,e,n,r){if(e===null||typeof e>"u"||Iv(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ze(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_e[t]=new ze(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_e[e]=new ze(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_e[t]=new ze(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_e[t]=new ze(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_e[t]=new ze(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_e[t]=new ze(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_e[t]=new ze(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_e[t]=new ze(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_e[t]=new ze(t,5,!1,t.toLowerCase(),null,!1,!1)});var eu=/[\-:]([a-z])/g;function tu(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!1,!1)});_e.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!0,!0)});function nu(t,e,n,r){var s=_e.hasOwnProperty(e)?_e[e]:null;(s!==null?s.type!==0:r||!(2l||s[o]!==i[l]){var a=` +`+s[o].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{Ql=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Ts(t):""}function Mv(t){switch(t.tag){case 5:return Ts(t.type);case 16:return Ts("Lazy");case 13:return Ts("Suspense");case 19:return Ts("SuspenseList");case 0:case 2:case 15:return t=Xl(t.type,!1),t;case 11:return t=Xl(t.type.render,!1),t;case 1:return t=Xl(t.type,!0),t;default:return""}}function qa(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dr:return"Fragment";case fr:return"Portal";case Ua:return"Profiler";case ru:return"StrictMode";case Ha:return"Suspense";case Va:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case sp:return(t.displayName||"Context")+".Consumer";case rp:return(t._context.displayName||"Context")+".Provider";case su:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case iu:return e=t.displayName||null,e!==null?e:qa(t.type)||"Memo";case rn:e=t._payload,t=t._init;try{return qa(t(e))}catch{}}return null}function Ov(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qa(e);case 8:return e===ru?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function _n(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function op(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $v(t){var e=op(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function bi(t){t._valueTracker||(t._valueTracker=$v(t))}function lp(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=op(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ko(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Wa(t,e){var n=e.checked;return se({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function zf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=_n(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ap(t,e){e=e.checked,e!=null&&nu(t,"checked",e,!1)}function Ka(t,e){ap(t,e);var n=_n(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Qa(t,e.type,n):e.hasOwnProperty("defaultValue")&&Qa(t,e.type,_n(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Bf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Qa(t,e,n){(e!=="number"||ko(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var bs=Array.isArray;function Ar(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=Ni.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pv=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(t){Pv.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Os[e]=Os[t]})});function dp(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Os.hasOwnProperty(t)&&Os[t]?(""+e).trim():e+"px"}function hp(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=dp(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Rv=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(t,e){if(e){if(Rv[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function Ya(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Za=null;function ou(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ec=null,Lr=null,Ir=null;function Vf(t){if(t=yi(t)){if(typeof ec!="function")throw Error(I(280));var e=t.stateNode;e&&(e=dl(e),ec(t.stateNode,t.type,e))}}function pp(t){Lr?Ir?Ir.push(t):Ir=[t]:Lr=t}function mp(){if(Lr){var t=Lr,e=Ir;if(Ir=Lr=null,Vf(t),e)for(t=0;t>>=0,t===0?32:31-(Qv(t)/Xv|0)|0}var Ci=64,Ai=4194304;function Ns(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function No(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Ns(l):(i&=o,i!==0&&(r=Ns(i)))}else o=n&~s,o!==0?r=Ns(o):i!==0&&(r=Ns(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function mi(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-kt(e),t[e]=n}function Zv(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Ps),Zf=" ",ed=!1;function $p(t,e){switch(t){case"keyup":return Nw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hr=!1;function Aw(t,e){switch(t){case"compositionend":return Pp(e);case"keypress":return e.which!==32?null:(ed=!0,Zf);case"textInput":return t=e.data,t===Zf&&ed?null:t;default:return null}}function Lw(t,e){if(hr)return t==="compositionend"||!pu&&$p(t,e)?(t=Mp(),to=fu=un=null,hr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sd(n)}}function zp(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zp(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bp(){for(var t=window,e=ko();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ko(t.document)}return e}function mu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Fw(t){var e=Bp(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&zp(n.ownerDocument.documentElement,n)){if(r!==null&&mu(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=id(n,i);var o=id(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pr=null,oc=null,Ds=null,lc=!1;function od(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lc||pr==null||pr!==ko(r)||(r=pr,"selectionStart"in r&&mu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ds&&Zs(Ds,r)||(Ds=r,r=Lo(oc,"onSelect"),0yr||(t.current=hc[yr],hc[yr]=null,yr--)}function V(t,e){yr++,hc[yr]=t.current,t.current=e}var kn={},Ae=Nn(kn),Xe=Nn(!1),Hn=kn;function zr(t,e){var n=t.type.contextTypes;if(!n)return kn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Ge(t){return t=t.childContextTypes,t!=null}function jo(){Q(Xe),Q(Ae)}function hd(t,e,n){if(Ae.current!==kn)throw Error(I(168));V(Ae,e),V(Xe,n)}function Gp(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(I(108,Ov(t)||"Unknown",s));return se({},n,r)}function Mo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kn,Hn=Ae.current,V(Ae,t),V(Xe,Xe.current),!0}function pd(t,e,n){var r=t.stateNode;if(!r)throw Error(I(169));n?(t=Gp(t,e,Hn),r.__reactInternalMemoizedMergedChildContext=t,Q(Xe),Q(Ae),V(Ae,t)):Q(Xe),V(Xe,n)}var Ht=null,hl=!1,ca=!1;function Jp(t){Ht===null?Ht=[t]:Ht.push(t)}function Jw(t){hl=!0,Jp(t)}function Cn(){if(!ca&&Ht!==null){ca=!0;var t=0,e=U;try{var n=Ht;for(U=1;t>=o,s-=o,Vt=1<<32-kt(e)+s|n<E?(k=b,b=null):k=b.sibling;var A=d(y,b,S[E],x);if(A===null){b===null&&(b=k);break}t&&b&&A.alternate===null&&e(y,b),g=i(A,g,E),T===null?_=A:T.sibling=A,T=A,b=k}if(E===S.length)return n(y,b),J&&An(y,E),_;if(b===null){for(;EE?(k=b,b=null):k=b.sibling;var L=d(y,b,A.value,x);if(L===null){b===null&&(b=k);break}t&&b&&L.alternate===null&&e(y,b),g=i(L,g,E),T===null?_=L:T.sibling=L,T=L,b=k}if(A.done)return n(y,b),J&&An(y,E),_;if(b===null){for(;!A.done;E++,A=S.next())A=f(y,A.value,x),A!==null&&(g=i(A,g,E),T===null?_=A:T.sibling=A,T=A);return J&&An(y,E),_}for(b=r(y,b);!A.done;E++,A=S.next())A=h(b,y,E,A.value,x),A!==null&&(t&&A.alternate!==null&&b.delete(A.key===null?E:A.key),g=i(A,g,E),T===null?_=A:T.sibling=A,T=A);return t&&b.forEach(function(C){return e(y,C)}),J&&An(y,E),_}function w(y,g,S,x){if(typeof S=="object"&&S!==null&&S.type===dr&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Ti:e:{for(var _=S.key,T=g;T!==null;){if(T.key===_){if(_=S.type,_===dr){if(T.tag===7){n(y,T.sibling),g=s(T,S.props.children),g.return=y,y=g;break e}}else if(T.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&xd(_)===T.type){n(y,T.sibling),g=s(T,S.props),g.ref=ms(y,T,S),g.return=y,y=g;break e}n(y,T);break}else e(y,T);T=T.sibling}S.type===dr?(g=Bn(S.props.children,y.mode,x,S.key),g.return=y,y=g):(x=co(S.type,S.key,S.props,null,y.mode,x),x.ref=ms(y,g,S),x.return=y,y=x)}return o(y);case fr:e:{for(T=S.key;g!==null;){if(g.key===T)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){n(y,g.sibling),g=s(g,S.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else e(y,g);g=g.sibling}g=ya(S,y.mode,x),g.return=y,y=g}return o(y);case rn:return T=S._init,w(y,g,T(S._payload),x)}if(bs(S))return v(y,g,S,x);if(us(S))return m(y,g,S,x);Pi(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,S),g.return=y,y=g):(n(y,g),g=ga(S,y.mode,x),g.return=y,y=g),o(y)):n(y,g)}return w}var Ur=im(!0),om=im(!1),vi={},Ot=Nn(vi),ri=Nn(vi),si=Nn(vi);function Pn(t){if(t===vi)throw Error(I(174));return t}function Eu(t,e){switch(V(si,e),V(ri,t),V(Ot,vi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ga(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ga(e,t)}Q(Ot),V(Ot,e)}function Hr(){Q(Ot),Q(ri),Q(si)}function lm(t){Pn(si.current);var e=Pn(Ot.current),n=Ga(e,t.type);e!==n&&(V(ri,t),V(Ot,n))}function Tu(t){ri.current===t&&(Q(Ot),Q(ri))}var ee=Nn(0);function Fo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ua=[];function bu(){for(var t=0;tn?n:4,t(!0);var r=fa.transition;fa.transition={};try{t(!1),e()}finally{U=n,fa.transition=r}}function km(){return mt().memoizedState}function t1(t,e,n){var r=vn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Em(t))Tm(e,n);else if(n=tm(t,e,n,r),n!==null){var s=Re();Et(n,t,r,s),bm(n,e,r)}}function n1(t,e,n){var r=vn(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Em(t))Tm(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,Tt(l,o)){var a=e.interleaved;a===null?(s.next=s,_u(e)):(s.next=a.next,a.next=s),e.interleaved=s;return}}catch{}finally{}n=tm(t,e,s,r),n!==null&&(s=Re(),Et(n,t,r,s),bm(n,e,r))}}function Em(t){var e=t.alternate;return t===ne||e!==null&&e===ne}function Tm(t,e){Fs=zo=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function bm(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,au(t,n)}}var Bo={readContext:pt,useCallback:Ee,useContext:Ee,useEffect:Ee,useImperativeHandle:Ee,useInsertionEffect:Ee,useLayoutEffect:Ee,useMemo:Ee,useReducer:Ee,useRef:Ee,useState:Ee,useDebugValue:Ee,useDeferredValue:Ee,useTransition:Ee,useMutableSource:Ee,useSyncExternalStore:Ee,useId:Ee,unstable_isNewReconciler:!1},r1={readContext:pt,useCallback:function(t,e){return It().memoizedState=[t,e===void 0?null:e],t},useContext:pt,useEffect:kd,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,io(4194308,4,vm.bind(null,e,t),n)},useLayoutEffect:function(t,e){return io(4194308,4,t,e)},useInsertionEffect:function(t,e){return io(4,2,t,e)},useMemo:function(t,e){var n=It();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=It();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=t1.bind(null,ne,t),[r.memoizedState,t]},useRef:function(t){var e=It();return t={current:t},e.memoizedState=t},useState:_d,useDebugValue:Iu,useDeferredValue:function(t){return It().memoizedState=t},useTransition:function(){var t=_d(!1),e=t[0];return t=e1.bind(null,t[1]),It().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ne,s=It();if(J){if(n===void 0)throw Error(I(407));n=n()}else{if(n=e(),ge===null)throw Error(I(349));qn&30||um(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,kd(dm.bind(null,r,i,t),[t]),r.flags|=2048,li(9,fm.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=It(),e=ge.identifierPrefix;if(J){var n=qt,r=Vt;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ii++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[jt]=e,t[ni]=r,$m(t,e,!1,!1),e.stateNode=t;e:{switch(o=Ya(n,r),n){case"dialog":K("cancel",t),K("close",t),s=r;break;case"iframe":case"object":case"embed":K("load",t),s=r;break;case"video":case"audio":for(s=0;sqr&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304)}else{if(!r)if(t=Fo(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),gs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!J)return Te(e),null}else 2*oe()-i.renderingStartTime>qr&&n!==1073741824&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=oe(),e.sibling=null,n=ee.current,V(ee,r?n&1|2:n&1),e):(Te(e),null);case 22:case 23:return Ru(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ye&1073741824&&(Te(e),e.subtreeFlags&6&&(e.flags|=8192)):Te(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function f1(t,e){switch(yu(e),e.tag){case 1:return Ge(e.type)&&jo(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hr(),Q(Xe),Q(Ae),bu(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Tu(e),null;case 13:if(Q(ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));Br()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Q(ee),null;case 4:return Hr(),null;case 10:return xu(e.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Di=!1,Ne=!1,d1=typeof WeakSet=="function"?WeakSet:Set,O=null;function xr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(t,e,r)}else n.current=null}function Tc(t,e,n){try{n()}catch(r){ie(t,e,r)}}var jd=!1;function h1(t,e){if(ac=Co,t=Bp(),mu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===s&&(l=o),d===i&&++u===r&&(a=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(cc={focusedElem:t,selectionRange:n},Co=!1,O=e;O!==null;)if(e=O,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,O=t;else for(;O!==null;){e=O;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,w=v.memoizedState,y=e.stateNode,g=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:wt(e.type,m),w);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){ie(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,O=t;break}O=e.return}return v=jd,jd=!1,v}function zs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Tc(e,n,i)}s=s.next}while(s!==r)}}function gl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function bc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Dm(t){var e=t.alternate;e!==null&&(t.alternate=null,Dm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[jt],delete e[ni],delete e[dc],delete e[Xw],delete e[Gw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Fm(t){return t.tag===5||t.tag===3||t.tag===4}function Md(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Nc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Io));else if(r!==4&&(t=t.child,t!==null))for(Nc(t,e,n),t=t.sibling;t!==null;)Nc(t,e,n),t=t.sibling}function Cc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Cc(t,e,n),t=t.sibling;t!==null;)Cc(t,e,n),t=t.sibling}var ve=null,St=!1;function nn(t,e,n){for(n=n.child;n!==null;)zm(t,e,n),n=n.sibling}function zm(t,e,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(al,n)}catch{}switch(n.tag){case 5:Ne||xr(n,e);case 6:var r=ve,s=St;ve=null,nn(t,e,n),ve=r,St=s,ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?aa(t.parentNode,n):t.nodeType===1&&aa(t,n),Js(t)):aa(ve,n.stateNode));break;case 4:r=ve,s=St,ve=n.stateNode.containerInfo,St=!0,nn(t,e,n),ve=r,St=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Tc(n,e,o),s=s.next}while(s!==r)}nn(t,e,n);break;case 1:if(!Ne&&(xr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ie(n,e,l)}nn(t,e,n);break;case 21:nn(t,e,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,nn(t,e,n),Ne=r):nn(t,e,n);break;default:nn(t,e,n)}}function Od(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new d1),e.forEach(function(r){var s=_1.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yt(t,e){var n=e.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m1(r/1960))-r,10t?16:t,fn===null)var r=!1;else{if(t=fn,fn=null,Vo=0,B&6)throw Error(I(331));var s=B;for(B|=4,O=t.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aoe()-$u?zn(t,0):Ou|=n),Je(t,e)}function Qm(t,e){e===0&&(t.mode&1?(e=Ai,Ai<<=1,!(Ai&130023424)&&(Ai=4194304)):e=1);var n=Re();t=Yt(t,e),t!==null&&(mi(t,e,n),Je(t,n))}function x1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Qm(t,n)}function _1(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(e),Qm(t,n)}var Xm;Xm=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Xe.current)Qe=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Qe=!1,c1(t,e,n);Qe=!!(t.flags&131072)}else Qe=!1,J&&e.flags&1048576&&Yp(e,$o,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;oo(t,e),t=e.pendingProps;var s=zr(e,Ae.current);Mr(e,n),s=Cu(null,e,r,t,s,n);var i=Au();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ge(r)?(i=!0,Mo(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ku(e),s.updater=pl,e.stateNode=s,s._reactInternals=e,vc(e,r,t,n),e=xc(null,e,r,!0,i,n)):(e.tag=0,J&&i&&gu(e),je(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(oo(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=E1(r),t=wt(r,t),s){case 0:e=Sc(null,e,r,t,n);break e;case 1:e=Ad(null,e,r,t,n);break e;case 11:e=Nd(null,e,r,t,n);break e;case 14:e=Cd(null,e,r,wt(r.type,t),n);break e}throw Error(I(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Sc(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Ad(t,e,r,s,n);case 3:e:{if(jm(e),t===null)throw Error(I(387));r=e.pendingProps,i=e.memoizedState,s=i.element,nm(t,e),Do(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Vr(Error(I(423)),e),e=Ld(t,e,r,n,s);break e}else if(r!==s){s=Vr(Error(I(424)),e),e=Ld(t,e,r,n,s);break e}else for(et=mn(e.stateNode.containerInfo.firstChild),nt=e,J=!0,xt=null,n=om(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===s){e=Zt(t,e,n);break e}je(t,e,r,n)}e=e.child}return e;case 5:return lm(e),t===null&&mc(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,uc(r,s)?o=null:i!==null&&uc(r,i)&&(e.flags|=32),Im(t,e),je(t,e,o,n),e.child;case 6:return t===null&&mc(e),null;case 13:return Mm(t,e,n);case 4:return Eu(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ur(e,null,r,n):je(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Nd(t,e,r,s,n);case 7:return je(t,e,e.pendingProps,n),e.child;case 8:return je(t,e,e.pendingProps.children,n),e.child;case 12:return je(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,V(Po,r._currentValue),r._currentValue=o,i!==null)if(Tt(i.value,o)){if(i.children===s.children&&!Xe.current){e=Zt(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Qt(-1,n&-n),a.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),gc(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(I(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),gc(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}je(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Mr(e,n),s=pt(s),r=r(s),e.flags|=1,je(t,e,r,n),e.child;case 14:return r=e.type,s=wt(r,e.pendingProps),s=wt(r.type,s),Cd(t,e,r,s,n);case 15:return Am(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),oo(t,e),e.tag=1,Ge(r)?(t=!0,Mo(e)):t=!1,Mr(e,n),sm(e,r,s),vc(e,r,s,n),xc(null,e,r,!0,t,n);case 19:return Om(t,e,n);case 22:return Lm(t,e,n)}throw Error(I(156,e.tag))};function Gm(t,e){return _p(t,e)}function k1(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(t,e,n,r){return new k1(t,e,n,r)}function Fu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function E1(t){if(typeof t=="function")return Fu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===su)return 11;if(t===iu)return 14}return 2}function wn(t,e){var n=t.alternate;return n===null?(n=ft(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function co(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Fu(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case dr:return Bn(n.children,s,i,e);case ru:o=8,s|=8;break;case Ua:return t=ft(12,n,e,s|2),t.elementType=Ua,t.lanes=i,t;case Ha:return t=ft(13,n,e,s),t.elementType=Ha,t.lanes=i,t;case Va:return t=ft(19,n,e,s),t.elementType=Va,t.lanes=i,t;case ip:return vl(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case rp:o=10;break e;case sp:o=9;break e;case su:o=11;break e;case iu:o=14;break e;case rn:o=16,r=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=ft(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Bn(t,e,n,r){return t=ft(7,t,r,e),t.lanes=n,t}function vl(t,e,n,r){return t=ft(22,t,r,e),t.elementType=ip,t.lanes=n,t.stateNode={isHidden:!1},t}function ga(t,e,n){return t=ft(6,t,null,e),t.lanes=n,t}function ya(t,e,n){return e=ft(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function T1(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jl(0),this.expirationTimes=Jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zu(t,e,n,r,s,i,o,l,a){return t=new T1(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ft(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(i),t}function b1(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eg)}catch(t){console.error(t)}}eg(),Yh.exports=st;var I1=Yh.exports,j1,Ud=I1;j1=Ud.createRoot,Ud.hydrateRoot;const As=Symbol("context"),tg=Symbol("next"),ng=Symbol("prev"),Hd=Symbol("events");class wT{constructor(e){W(this,"startTime");W(this,"endTime");W(this,"browserName");W(this,"channel");W(this,"platform");W(this,"wallTime");W(this,"title");W(this,"options");W(this,"pages");W(this,"actions");W(this,"events");W(this,"stdio");W(this,"errors");W(this,"errorDescriptors");W(this,"hasSource");W(this,"hasStepData");W(this,"sdkLanguage");W(this,"testIdAttributeName");W(this,"sources");W(this,"resources");e.forEach(r=>M1(r));const n=e.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=O1(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,s)=>Math.min(r||Number.MAX_VALUE,s),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,s)=>Math.min(r,s),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,s)=>Math.max(r,s),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.events.sort((r,s)=>r.time-s.time),this.resources.sort((r,s)=>r._monotonicTime-s._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=V1(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){const e=[];for(const n of this.errors||[])n.message&&e.push({stack:n.stack,message:n.message});return e}}function M1(t){for(const n of t.pages)n[As]=t;for(let n=0;n=0;n--){const r=t.actions[n];r[tg]=e,r.apiName.includes("route.")||(e=r)}for(const n of t.events)n[As]=t;for(const n of t.resources)n[As]=t}function O1(t){const e=new Map;for(const s of t){const i=s.traceUrl;let o=e.get(i);o||(o=[],e.set(i,o)),o.push(s)}const n=[];let r=0;for(const[,s]of e){e.size>1&&$1(s,++r);const i=P1(s);n.push(...i)}n.sort((s,i)=>i.parentId===s.callId?-1:s.parentId===i.callId?1:s.startTime-i.startTime);for(let s=1;sl.origin==="library"),r=t.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return t.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const s=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const c=s?a.stepId:`${a.apiName}@${a.wallTime}`;e.set(c,{...a,context:l})}const i=D1(r,e,s);i&&R1(n,i);const o=new Map;for(const l of r)for(const a of l.actions){const c=s?a.callId:`${a.apiName}@${a.wallTime}`,u=e.get(c);if(u){o.set(a.callId,u.callId),a.error&&(u.error=a.error),a.attachments&&(u.attachments=a.attachments),a.parentId&&(u.parentId=o.get(a.parentId)??a.parentId),u.startTime=a.startTime,u.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),e.set(c,{...a,context:l})}return[...e.values()]}function R1(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const s of r.screencastFrames)s.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function D1(t,e,n){for(const r of t)for(const s of r.actions){if(!s.startTime)continue;const i=n?s.callId:`${s.apiName}@${s.wallTime}`,o=e.get(i);if(o)return s.startTime-o.startTime}return 0}function F1(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const s=r.action.parentId&&e.get(r.action.parentId)||n;s.children.push(r),r.parent=s}return{rootItem:n,itemMap:e}}function Ko(t){return t[As]}function z1(t){return t[tg]}function B1(t){return t[ng]}function U1(t){let e=0,n=0;for(const r of H1(t)){if(r.type==="console"){const s=r.messageType;s==="warning"?++n:s==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function H1(t){let e=t[Hd];if(e)return e;const n=z1(t);return e=Ko(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time{const a=Math.max(s,t)*window.devicePixelRatio,[c,u]=Dr(i?i+"."+r+":size":void 0,a),[f,d]=Dr(i?i+"."+r+":size":void 0,a),[h,v]=N.useState(null),[m,w]=Xn();let y;r==="vertical"?(y=f/window.devicePixelRatio,m&&m.heightv({offset:r==="vertical"?S.clientY:S.clientX,size:y}),onMouseUp:()=>v(null),onMouseMove:S=>{if(!S.buttons)v(null);else if(h){const _=(r==="vertical"?S.clientY:S.clientX)-h.offset,T=n?h.size+_:h.size-_,E=S.target.parentElement.getBoundingClientRect(),k=Math.min(Math.max(s,T),(r==="vertical"?E.height:E.width)-s);r==="vertical"?d(k*window.devicePixelRatio):u(k*window.devicePixelRatio)}}})]})};function kl(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function Xo(t){return t.charAt(0).toUpperCase()+t.substring(1)}function rg(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ut(t){let e="";for(let n=0;n=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}let In;function K1(){In=new Map}function De(t){let e=In==null?void 0:In.get(t);return e===void 0&&(e=t.replace(/\u200b/g,"").trim().replace(/\s+/g," "),In==null||In.set(t,e)),e}function El(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function sg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ve(t,e){return typeof t!="string"?sg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function Oe(t,e){return typeof t!="string"?sg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Q1(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Vd(t,e){return Q1(t,e,"…")}function Go(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X1(t,e){const n=t.length,r=e.length;let s=0,i=0;const o=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let l=1;l<=n;l++)for(let a=1;a<=r;a++)t[l-1]===e[a-1]&&(o[l][a]=o[l-1][a-1]+1,o[l][a]>s&&(s=o[l][a],i=l));return t.slice(i-s,i)}const ue=function(t,e,n){return t>=e&&t<=n};function Ue(t){return ue(t,48,57)}function qd(t){return Ue(t)||ue(t,65,70)||ue(t,97,102)}function G1(t){return ue(t,65,90)}function J1(t){return ue(t,97,122)}function Y1(t){return G1(t)||J1(t)}function Z1(t){return t>=128}function uo(t){return Y1(t)||Z1(t)||t===95}function Wd(t){return uo(t)||Ue(t)||t===45}function eS(t){return ue(t,0,8)||t===11||ue(t,14,31)||t===127}function fo(t){return t===10}function Ft(t){return fo(t)||t===9||t===32}const tS=1114111;class Vu extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function nS(t){const e=[];for(let n=0;n=e.length?-1:e[C]},o=function(C){if(C===void 0&&(C=1),C>3)throw"Spec Error: no more than three codepoints of lookahead.";return i(n+C)},l=function(C){return C===void 0&&(C=1),n+=C,s=i(n),!0},a=function(){return n-=1,!0},c=function(C){return C===void 0&&(C=s),C===-1},u=function(){if(f(),l(),Ft(s)){for(;Ft(o());)l();return new Mc}else{if(s===34)return v();if(s===35)if(Wd(o())||y(o(1),o(2))){const C=new wg("");return S(o(1),o(2),o(3))&&(C.type="id"),C.value=b(),C}else return new be(s);else return s===36?o()===61?(l(),new lS):new be(s):s===39?v():s===40?new pg:s===41?new mg:s===42?o()===61?(l(),new aS):new be(s):s===43?T()?(a(),d()):new be(s):s===44?new ug:s===45?T()?(a(),d()):o(1)===45&&o(2)===62?(l(2),new lg):x()?(a(),h()):new be(s):s===46?T()?(a(),d()):new be(s):s===58?new ag:s===59?new cg:s===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new og):new be(s):s===64?S(o(1),o(2),o(3))?new vg(b()):new be(s):s===91?new hg:s===92?g()?(a(),h()):new be(s):s===93?new Oc:s===94?o()===61?(l(),new oS):new be(s):s===123?new fg:s===124?o()===61?(l(),new iS):o()===124?(l(),new gg):new be(s):s===125?new dg:s===126?o()===61?(l(),new sS):new be(s):Ue(s)?(a(),d()):uo(s)?(a(),h()):c()?new po:new be(s)}},f=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),s===42&&o()===47){l();break}else if(c())return},d=function(){const C=E();if(S(o(1),o(2),o(3))){const M=new cS;return M.value=C.value,M.repr=C.repr,M.type=C.type,M.unit=b(),M}else if(o()===37){l();const M=new kg;return M.value=C.value,M.repr=C.repr,M}else{const M=new _g;return M.value=C.value,M.repr=C.repr,M.type=C.type,M}},h=function(){const C=b();if(C.toLowerCase()==="url"&&o()===40){for(l();Ft(o(1))&&Ft(o(2));)l();return o()===34||o()===39?new mo(C):Ft(o())&&(o(2)===34||o(2)===39)?new mo(C):m()}else return o()===40?(l(),new mo(C)):new yg(C)},v=function(C){C===void 0&&(C=s);let M="";for(;l();){if(s===C||c())return new Sg(M);if(fo(s))return a(),new ig;s===92?c(o())||(fo(o())?l():M+=de(w())):M+=de(s)}throw new Error("Internal error")},m=function(){const C=new xg("");for(;Ft(o());)l();if(c(o()))return C;for(;l();){if(s===41||c())return C;if(Ft(s)){for(;Ft(o());)l();return o()===41||c(o())?(l(),C):(A(),new ho)}else{if(s===34||s===39||s===40||eS(s))return A(),new ho;if(s===92)if(g())C.value+=de(w());else return A(),new ho;else C.value+=de(s)}}throw new Error("Internal error")},w=function(){if(l(),qd(s)){const C=[s];for(let F=0;F<5&&qd(o());F++)l(),C.push(s);Ft(o())&&l();let M=parseInt(C.map(function(F){return String.fromCharCode(F)}).join(""),16);return M>tS&&(M=65533),M}else return c()?65533:s},y=function(C,M){return!(C!==92||fo(M))},g=function(){return y(s,o())},S=function(C,M,F){return C===45?uo(M)||M===45||y(M,F):uo(C)?!0:C===92?y(C,M):!1},x=function(){return S(s,o(1),o(2))},_=function(C,M,F){return C===43||C===45?!!(Ue(M)||M===46&&Ue(F)):C===46?!!Ue(M):!!Ue(C)},T=function(){return _(s,o(1),o(2))},b=function(){let C="";for(;l();)if(Wd(s))C+=de(s);else if(g())C+=de(w());else return a(),C;throw new Error("Internal parse error")},E=function(){let C="",M="integer";for((o()===43||o()===45)&&(l(),C+=de(s));Ue(o());)l(),C+=de(s);if(o(1)===46&&Ue(o(2)))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const F=o(1),Z=o(2),Be=o(3);if((F===69||F===101)&&Ue(Z))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);else if((F===69||F===101)&&(Z===43||Z===45)&&Ue(Be))for(l(),C+=de(s),l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const Le=k(C);return{type:M,value:Le,repr:C}},k=function(C){return+C},A=function(){for(;l();){if(s===41||c())return;g()&&w()}};let L=0;for(;!c(o());)if(r.push(u()),L++,L>e.length*2)throw new Error("I'm infinite-looping!");return r}class ae{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ig extends ae{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ho extends ae{constructor(){super(...arguments),this.tokenType="BADURL"}}class Mc extends ae{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class og extends ae{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class ag extends ae{constructor(){super(...arguments),this.tokenType=":"}}class cg extends ae{constructor(){super(...arguments),this.tokenType=";"}}class ug extends ae{constructor(){super(...arguments),this.tokenType=","}}class Yr extends ae{constructor(){super(...arguments),this.value="",this.mirror=""}}class fg extends Yr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class dg extends Yr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class hg extends Yr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Oc extends Yr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class pg extends Yr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class mg extends Yr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class sS extends ae{constructor(){super(...arguments),this.tokenType="~="}}class iS extends ae{constructor(){super(...arguments),this.tokenType="|="}}class oS extends ae{constructor(){super(...arguments),this.tokenType="^="}}class lS extends ae{constructor(){super(...arguments),this.tokenType="$="}}class aS extends ae{constructor(){super(...arguments),this.tokenType="*="}}class gg extends ae{constructor(){super(...arguments),this.tokenType="||"}}class po extends ae{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class be extends ae{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=de(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\ +`:this.value}}class Zr extends ae{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class yg extends Zr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return wi(this.value)}}class mo extends Zr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return wi(this.value)+"("}}class vg extends Zr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+wi(this.value)}}class wg extends Zr{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+wi(this.value):"#"+uS(this.value)}}class Sg extends Zr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+Eg(this.value)+'"'}}class xg extends Zr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Eg(this.value)+'")'}}class _g extends ae{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class kg extends ae{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class cS extends ae{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let n=wi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||ue(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function wi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r=128||s===45||s===95||ue(s,48,57)||ue(s,65,90)||ue(s,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function uS(t){t=""+t;let e="";for(let n=0;n=128||r===45||r===95||ue(r,48,57)||ue(r,65,90)||ue(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function Eg(t){t=""+t;let e="";for(let n=0;nk instanceof vg||k instanceof ig||k instanceof ho||k instanceof gg||k instanceof og||k instanceof lg||k instanceof cg||k instanceof fg||k instanceof dg||k instanceof xg||k instanceof kg);if(r)throw new qe(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let s=0;const i=new Set;function o(){return new qe(`Unexpected token "${n[s].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function l(){for(;n[s]instanceof Mc;)s++}function a(k=s){return n[k]instanceof yg}function c(k=s){return n[k]instanceof Sg}function u(k=s){return n[k]instanceof _g}function f(k=s){return n[k]instanceof ug}function d(k=s){return n[k]instanceof pg}function h(k=s){return n[k]instanceof mg}function v(k=s){return n[k]instanceof mo}function m(k=s){return n[k]instanceof be&&n[k].value==="*"}function w(k=s){return n[k]instanceof po}function y(k=s){return n[k]instanceof be&&[">","+","~"].includes(n[k].value)}function g(k=s){return f(k)||h(k)||w(k)||y(k)||n[k]instanceof Mc}function S(){const k=[x()];for(;l(),!!f();)s++,k.push(x());return k}function x(){return l(),u()||c()?n[s++].value:_()}function _(){const k={simples:[]};for(l(),y()?k.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):k.simples.push({selector:T(),combinator:""});;){if(l(),y())k.simples[k.simples.length-1].combinator=n[s++].value,l();else if(g())break;k.simples.push({combinator:"",selector:T()})}return k}function T(){let k="";const A=[];for(;!g();)if(a()||m())k+=n[s++].toSource();else if(n[s]instanceof wg)k+=n[s++].toSource();else if(n[s]instanceof be&&n[s].value===".")if(s++,a())k+="."+n[s++].toSource();else throw o();else if(n[s]instanceof ag)if(s++,a())if(!e.has(n[s].value.toLowerCase()))k+=":"+n[s++].toSource();else{const L=n[s++].value.toLowerCase();A.push({name:L,args:[]}),i.add(L)}else if(v()){const L=n[s++].value.toLowerCase();if(e.has(L)?(A.push({name:L,args:S()}),i.add(L)):k+=`:${L}(${b()})`,l(),!h())throw o();s++}else throw o();else if(n[s]instanceof hg){for(k+="[",s++;!(n[s]instanceof Oc)&&!w();)k+=n[s++].toSource();if(!(n[s]instanceof Oc))throw o();k+="]",s++}else throw o();if(!k&&!A.length)throw o();return{css:k||void 0,functions:A}}function b(){let k="",A=1;for(;!w()&&((d()||v())&&A++,h()&&A--,!!A);)k+=n[s++].toSource();return k}const E=S();if(!w())throw o();if(E.some(k=>typeof k!="object"||!("simples"in k)))throw new qe(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:E,names:Array.from(i)}}const $c=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),dS=new Set(["left-of","right-of","above","below","near"]),Tg=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function Tl(t){const e=mS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const s=fS(r.body,Tg);n.push({name:"css",body:s.selector,source:r.body});continue}if($c.has(r.name)){let s,i;try{const c=JSON.parse("["+r.body+"]");if(!Array.isArray(c)||c.length<1||c.length>2||typeof c[0]!="string")throw new qe(`Malformed selector: ${r.name}=`+r.body);if(s=c[0],c.length===2){if(typeof c[1]!="number"||!dS.has(r.name))throw new qe(`Malformed selector: ${r.name}=`+r.body);i=c[1]}}catch{throw new qe(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:Tl(s),distance:i}},l=[...o.body.parsed.parts].reverse().find(c=>c.name==="internal:control"&&c.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&hS(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if($c.has(n[0].name))throw new qe(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function hS(t,e){return Wt({parts:t})===Wt({parts:e})}function Wt(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let s=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(s=!1);const i=s?n.name+"=":"";return`${r===t.capture?"*":""}${i}${n.source}`}).join(" >> ")}function pS(t,e){const n=(r,s)=>{for(const i of r.parts)e(i,s),$c.has(i.name)&&n(i.body.parsed,!0)};n(t,!1)}function mS(t){let e=0,n,r=0;const s={parts:[]},i=()=>{const l=t.substring(r,e).trim(),a=l.indexOf("=");let c,u;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(c=l.substring(0,a).trim(),u=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(c="text",u=l):/^\(*\/\//.test(l)||l.startsWith("..")?(c="xpath",u=l):(c="css",u=l);let f=!1;if(c[0]==="*"&&(f=!0,c=c.substring(1)),s.parts.push({name:c,body:u}),f){if(s.capture!==void 0)throw new qe("Only one of the selectors can capture using * modifier");s.capture=s.parts.length-1}};if(!t.includes(">>"))return e=t.length,i(),s;const o=()=>{const a=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;e"&&t[e+1]===">"?(i(),e+=2,r=e):e++}return i(),s}function Un(t,e){let n=0,r=t.length===0;const s=()=>t[n]||"",i=()=>{const w=s();return++n,r=n>=t.length,w},o=w=>{throw r?new qe(`Unexpected end of selector while parsing selector \`${t}\``):new qe(`Error while parsing selector \`${t}\` - unexpected symbol "${s()}" at position ${n}`+(w?" during "+w:""))};function l(){for(;!r&&/\s/.test(s());)i()}function a(w){return w>="€"||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function c(){let w="";for(l();!r&&a(s());)w+=i();return w}function u(w){let y=i();for(y!==w&&o("parsing quoted string");!r&&s()!==w;)s()==="\\"&&i(),y+=i();return s()!==w&&o("parsing quoted string"),y+=i(),y}function f(){i()!=="/"&&o("parsing regular expression");let w="",y=!1;for(;!r;){if(s()==="\\")w+=i(),r&&o("parsing regular expression");else if(y&&s()==="]")y=!1;else if(!y&&s()==="[")y=!0;else if(!y&&s()==="/")break;w+=i()}i()!=="/"&&o("parsing regular expression");let g="";for(;!r&&s().match(/[dgimsuy]/);)g+=i();try{return new RegExp(w,g)}catch(S){throw new qe(`Error while parsing selector \`${t}\`: ${S.message}`)}}function d(){let w="";return l(),s()==="'"||s()==='"'?w=u(s()).slice(1,-1):w=c(),w||o("parsing property path"),w}function h(){l();let w="";return r||(w+=i()),!r&&w!=="="&&(w+=i()),["=","*=","^=","$=","|=","~="].includes(w)||o("parsing operator"),w}function v(){i();const w=[];for(w.push(d()),l();s()===".";)i(),w.push(d()),l();if(s()==="]")return i(),{name:w.join("."),jsonPath:w,op:"",value:null,caseSensitive:!1};const y=h();let g,S=!0;if(l(),s()==="/"){if(y!=="=")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with regular expression`);g=f()}else if(s()==="'"||s()==='"')g=u(s()).slice(1,-1),l(),s()==="i"||s()==="I"?(S=!1,i()):(s()==="s"||s()==="S")&&(S=!0,i());else{for(g="";!r&&(a(s())||s()==="+"||s()===".");)g+=i();g==="true"?g=!0:g==="false"?g=!1:e||(g=+g,Number.isNaN(g)&&o("parsing attribute value"))}if(l(),s()!=="]"&&o("parsing attribute value"),i(),y!=="="&&typeof g!="string")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with non-string matching value - ${g}`);return{name:w.join("."),jsonPath:w,op:y,value:g,caseSensitive:S}}const m={name:"",attributes:[]};for(m.name=c(),l();s()==="[";)m.attributes.push(v()),l();if(r||o(void 0),!m.name&&!m.attributes.length)throw new qe(`Error while parsing selector \`${t}\` - selector cannot be empty`);return m}function Sn(t,e,n=!1){return bg(t,e,n,1)[0]}function bg(t,e,n=!1,r=20,s){try{return cr(new _S[t](s),Tl(e),n,r)}catch{return[e]}}function cr(t,e,n=!1,r=20){const s=[...e.parts],i=[];let o=n?"frame-locator":"page";for(let l=0;lt.generateLocator(c,"has",m)));continue}if(a.name==="internal:has-not"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"hasNot",m)));continue}if(a.name==="internal:and"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"and",m)));continue}if(a.name==="internal:or"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"or",m)));continue}if(a.name==="internal:chain"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"chain",m)));continue}if(a.name==="internal:label"){const{exact:v,text:m}=ws(a.body);i.push([t.generateLocator(c,"label",m,{exact:v})]);continue}if(a.name==="internal:role"){const v=Un(a.body,!0),m={attrs:[]};for(const w of v.attributes)w.name==="name"?(m.exact=w.caseSensitive,m.name=w.value):(w.name==="level"&&typeof w.value=="string"&&(w.value=+w.value),m.attrs.push({name:w.name==="include-hidden"?"includeHidden":w.name,value:w.value}));i.push([t.generateLocator(c,"role",v.name,m)]);continue}if(a.name==="internal:testid"){const v=Un(a.body,!0),{value:m}=v.attributes[0];i.push([t.generateLocator(c,"test-id",m)]);continue}if(a.name==="internal:attr"){const v=Un(a.body,!0),{name:m,value:w,caseSensitive:y}=v.attributes[0],g=w,S=!!y;if(m==="placeholder"){i.push([t.generateLocator(c,"placeholder",g,{exact:S})]);continue}if(m==="alt"){i.push([t.generateLocator(c,"alt",g,{exact:S})]);continue}if(m==="title"){i.push([t.generateLocator(c,"title",g,{exact:S})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const v=i[i.length-1],m=s[l-1],w=v.map(y=>t.chainLocators([y,t.generateLocator(c,"frame","")]));["xpath","css"].includes(m.name)&&w.push(t.generateLocator(c,"frame-locator",Wt({parts:[m]})),t.generateLocator(c,"frame-locator",Wt({parts:[m]},!0))),v.splice(0,v.length,...w),o="frame-locator";continue}const u=s[l+1],f=Wt({parts:[a]}),d=t.generateLocator(c,"default",f);if(u&&["internal:has-text","internal:has-not-text"].includes(u.name)){const{exact:v,text:m}=ws(u.body);if(!v){const w=t.generateLocator("locator",u.name==="internal:has-text"?"has-text":"has-not-text",m,{exact:v}),y={};u.name==="internal:has-text"?y.hasText=m:y.hasNotText=m;const g=t.generateLocator(c,"default",f,y);i.push([t.chainLocators([d,w]),g]),l++;continue}}let h;if(["xpath","css"].includes(a.name)){const v=Wt({parts:[a]},!0);h=t.generateLocator(c,"default",v)}i.push([d,h].filter(Boolean))}return gS(t,i,r)}function gS(t,e,n){const r=e.map(()=>""),s=[],i=o=>{if(o===e.length)return s.push(t.chainLocators(r)),s.lengthJSON.parse(r));for(let r=0;rES(e,l,f.expandedItems,m||0,o),[e,l,f,m,o]),y=N.useRef(null),[g,S]=N.useState(),[x,_]=N.useState(!1);N.useEffect(()=>{u==null||u(g)},[u,g]),N.useEffect(()=>{const b=y.current;if(!b)return;const E=()=>{Kd.set(t,b.scrollTop)};return b.addEventListener("scroll",E,{passive:!0}),()=>b.removeEventListener("scroll",E)},[t]),N.useEffect(()=>{y.current&&(y.current.scrollTop=Kd.get(t)||0)},[t]);const T=N.useCallback(b=>{const{expanded:E}=w.get(b);if(E){for(let k=l;k;k=k.parent)if(k===b){c==null||c(b);break}f.expandedItems.set(b.id,!1)}else f.expandedItems.set(b.id,!0);d({...f})},[w,l,c,f,d]);return p.jsx("div",{className:le("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":v||t+"-tree",children:p.jsxs("div",{className:le("tree-view-content"),tabIndex:0,onKeyDown:b=>{if(l&&b.key==="Enter"){a==null||a(l);return}if(b.key!=="ArrowDown"&&b.key!=="ArrowUp"&&b.key!=="ArrowLeft"&&b.key!=="ArrowRight")return;if(b.stopPropagation(),b.preventDefault(),l&&b.key==="ArrowLeft"){const{expanded:k,parent:A}=w.get(l);k?(f.expandedItems.set(l.id,!1),d({...f})):A&&(c==null||c(A));return}if(l&&b.key==="ArrowRight"){l.children.length&&(f.expandedItems.set(l.id,!0),d({...f}));return}let E=l;if(b.key==="ArrowDown"&&(l?E=w.get(l).next:w.size&&(E=[...w.keys()][0])),b.key==="ArrowUp"){if(l)E=w.get(l).prev;else if(w.size){const k=[...w.keys()];E=k[k.length-1]}}u==null||u(void 0),E&&(_(!0),c==null||c(E)),S(void 0)},ref:y,children:[h&&w.size===0&&p.jsx("div",{className:"tree-view-empty",children:h}),e.children.map(b=>w.get(b)&&p.jsx(Ng,{item:b,treeItems:w,selectedItem:l,onSelected:c,onAccepted:a,isError:i,toggleExpanded:T,highlightedItem:g,setHighlightedItem:S,render:n,icon:s,title:r,isKeyboardNavigation:x,setIsKeyboardNavigation:_},b.id))]})})}function Ng({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:s,setHighlightedItem:i,isError:o,onAccepted:l,toggleExpanded:a,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h}){const v=N.useId(),m=N.useRef(null);N.useEffect(()=>{n===t&&d&&m.current&&(Gh(m.current),h(!1))},[t,n,d,h]);const w=e.get(t),y=w.depth,g=w.expanded;let S="codicon-blank";typeof g=="boolean"&&(S=g?"codicon-chevron-down":"codicon-chevron-right");const x=c(t),_=g&&t.children.length?t.children:[],T=u==null?void 0:u(t),b=(f==null?void 0:f(t))||"codicon-blank";return p.jsxs("div",{ref:m,role:"treeitem","aria-selected":t===n,"aria-expanded":g,"aria-controls":v,title:T,className:"vbox",style:{flex:"none"},children:[p.jsxs("div",{onDoubleClick:()=>l==null?void 0:l(t),className:le("tree-view-entry",n===t&&"selected",s===t&&"highlighted",(o==null?void 0:o(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>i(t),onMouseLeave:()=>i(void 0),children:[y?new Array(y).fill(0).map((E,k)=>p.jsx("div",{className:"tree-view-indent"},"indent-"+k)):void 0,p.jsx("div",{"aria-hidden":"true",className:"codicon "+S,style:{minWidth:16,marginRight:4},onDoubleClick:E=>{E.preventDefault(),E.stopPropagation()},onClick:E=>{E.stopPropagation(),E.preventDefault(),a(t)}}),f&&p.jsx("div",{className:"codicon "+b,style:{minWidth:16,marginRight:4},"aria-label":"["+b.replace("codicon","icon")+"]"}),typeof x=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:x}):x]}),!!_.length&&p.jsx("div",{id:v,role:"group",children:_.map(E=>e.get(E)&&p.jsx(Ng,{item:E,treeItems:e,selectedItem:n,onSelected:r,onAccepted:l,isError:o,toggleExpanded:a,highlightedItem:s,setHighlightedItem:i,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h},E.id))})]})}function ES(t,e,n,r,s=()=>!0){if(!s(t))return new Map;const i=new Map,o=new Set;for(let c=e==null?void 0:e.parent;c;c=c.parent)o.add(c.id);let l=null;const a=(c,u)=>{for(const f of c.children){if(!s(f))continue;const d=o.has(f.id)||n.get(f.id),h=r>u&&i.size<25&&d!==!1,v=f.children.length?d??h:void 0,m={depth:u,expanded:v,parent:t===c?null:c,next:null,prev:l};l&&(i.get(l).next=f),l=f,i.set(f,m),v&&a(f,u+1)}};return a(t,0),i}const bt=N.forwardRef(function({children:e,title:n="",icon:r,disabled:s=!1,toggled:i=!1,onClick:o=()=>{},style:l,testId:a,className:c,ariaLabel:u},f){return p.jsxs("button",{ref:f,className:le(c,"toolbar-button",r,i&&"toggled"),onMouseDown:Qd,onClick:o,onDoubleClick:Qd,title:n,disabled:!!s,style:l,"data-testid":a,"aria-label":u||n,children:[r&&p.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Qd=t=>{t.stopPropagation(),t.preventDefault()};function Cg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function TS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const bS=kS,NS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:s,onSelected:i,onHighlighted:o,revealConsole:l,revealAttachment:a,isLive:c})=>{const[u,f]=N.useState({expandedItems:new Map}),{rootItem:d,itemMap:h}=N.useMemo(()=>F1(t),[t]),{selectedItem:v}=N.useMemo(()=>({selectedItem:e?h.get(e.callId):void 0}),[h,e]),m=N.useCallback(_=>{var T,b;return!!((b=(T=_.action)==null?void 0:T.error)!=null&&b.message)},[]),w=N.useCallback(_=>r({minimum:_.action.startTime,maximum:_.action.endTime}),[r]),y=N.useCallback(_=>qu(_.action,{sdkLanguage:s,revealConsole:l,revealAttachment:a,isLive:c,showDuration:!0,showBadges:!0}),[c,l,a,s]),g=N.useCallback(_=>!n||!_.action||_.action.startTime<=n.maximum&&_.action.endTime>=n.minimum,[n]),S=N.useCallback(_=>{i==null||i(_.action)},[i]),x=N.useCallback(_=>{o==null||o(_==null?void 0:_.action)},[o]);return p.jsxs("div",{className:"vbox",children:[n&&p.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[p.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),p.jsx(bS,{name:"actions",rootItem:d,treeState:u,setTreeState:f,selectedItem:v,onSelected:S,onHighlighted:x,onAccepted:w,isError:m,isVisible:g,render:y})]})},qu=(t,e)=>{var v;const{sdkLanguage:n,revealConsole:r,revealAttachment:s,isLive:i,showDuration:o,showBadges:l}=e,{errors:a,warnings:c}=U1(t),u=!!((v=t.attachments)!=null&&v.length)&&!!s,f=Ag(t,n||"javascript"),d=t.class==="Test"&&t.method==="test.step.skip";let h="";return t.endTime?h=Pe(t.endTime-t.startTime):t.error?h="Timed out":i||(h="-"),p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"action-title",title:t.apiName,children:[p.jsx("span",{children:t.apiName}),f&&(f.type==="locator"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"action-parameter action-locator-parameter",children:f.value}),f.childDisplayString&&p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.childDisplayString.value})]}):p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.value})),t.method==="goto"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:t.params.url}),t.class==="APIRequestContext"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:CS(t.params.url)})]}),(o||l||u||d)&&p.jsx("div",{className:"spacer"}),u&&p.jsx(bt,{icon:"attach",title:"Open Attachment",onClick:()=>s(t.attachments[0])}),o&&!d&&p.jsx("div",{className:"action-duration",children:h||p.jsx("span",{className:"codicon codicon-loading"})}),d&&p.jsx("span",{className:le("action-skipped","codicon",Cg("skipped")),title:"skipped"}),l&&p.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!a&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-error"}),p.jsx("span",{className:"action-icon-value",children:a})]}),!!c&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-warning"}),p.jsx("span",{className:"action-icon-value",children:c})]})]})]})};function CS(t){try{const e=new URL(t);return e.pathname+e.search}catch{return t}}const AS=t=>{switch(t.method){case"clockPauseAt":case"clockSetFixedTime":case"clockSetSystemTime":return t.params.timeString===void 0&&t.params.timeNumber===void 0?void 0:{type:"generic",value:new Date(t.params.timeString??t.params.timeNumber).toLocaleString(void 0,{timeZone:"UTC"})};case"clockFastForward":case"clockRunFor":return t.params.ticksNumber===void 0&&t.params.ticksString===void 0?void 0:{type:"generic",value:t.params.ticksString??`${t.params.ticksNumber}ms`}}},LS=t=>{switch(t.method){case"press":case"keyboardPress":case"keyboardDown":case"keyboardUp":return t.params.key===void 0?void 0:{type:"generic",value:t.params.key};case"type":case"fill":case"keyboardType":case"keyboardInsertText":{const e=t.params.text??t.params.value;return e===void 0?void 0:{type:"generic",value:`"${e}"`}}}},IS=t=>{switch(t.method){case"click":case"dblclick":case"mouseClick":case"mouseMove":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`};case"mouseWheel":return t.params.deltaX===void 0||t.params.deltaY===void 0?void 0:{type:"generic",value:`(${t.params.deltaX}, ${t.params.deltaY})`}}},jS=t=>{switch(t.method){case"tap":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`}}},Ag=(t,e,n=!1)=>{const r=t.params;if(!n&&r.selector!==void 0)return{type:"locator",value:Sn(e,r.selector),childDisplayString:Ag(t,e,!0)};switch(t.class.toLowerCase()){case"browsercontext":return AS(t);case"page":case"frame":case"elementhandle":return LS(t)??IS(t)??jS(t)}},Lg=({value:t,description:e})=>{const[n,r]=N.useState("copy"),s=N.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return p.jsx(bt,{title:e||"Copy",icon:n,onClick:s})},wa=({value:t,description:e})=>{const n=N.useCallback(async()=>{const r=typeof t=="function"?await t():t;await navigator.clipboard.writeText(r)},[t]);return p.jsx(bt,{title:e,onClick:n,className:"copy-to-clipboard-text-button",children:e})},Yn=({text:t})=>p.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),MS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=N.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(l=>l!=="info"),[t]);if(!t)return p.jsx(Yn,{text:"No action selected"});const s=t.startTime-e,i=Pe(s),o=t.endTime?Pe(t.endTime-t.startTime):"Timed Out";return p.jsxs("div",{className:"call-tab",children:[p.jsx("div",{className:"call-line",children:t.apiName}),p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Time"}),p.jsx(Xd,{name:"start:",value:i}),p.jsx(Xd,{name:"duration:",value:o})]}),!!r.length&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Parameters"}),r.map(l=>Gd(Jd(t,l,t.params[l],n)))]}),!!t.result&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(l=>Gd(Jd(t,l,t.result[l],n)))]})]})},Xd=({name:t,value:e})=>p.jsxs("div",{className:"call-line",children:[t,p.jsx("span",{className:"call-value datetime",title:e,children:e})]});function Gd(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),p.jsxs("div",{className:"call-line",children:[t.name,":",p.jsx("span",{className:le("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&p.jsx(Lg,{value:t.text})]},t.name)}function Jd(t,e,n,r){const s=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&s)&&(n=Jo(n.value,new Array(10).fill({handle:""}))),(e==="value"&&s||e==="received"&&t.method==="expect")&&(n=Jo(n,new Array(10).fill({handle:""}))),e==="selector")return{text:Sn(r||"javascript",t.params.selector),type:"locator",name:"locator"};const i=typeof n;return i!=="object"||n===null?{text:String(n),type:i,name:e}:n.guid?{text:"",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Jo(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Jo(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:s}of t.o)n[r]=Jo(s,e);return n}return t.h!==void 0?e===void 0?"":e[t.h]:""}const Yd=new Map;function bl({name:t,items:e=[],id:n,render:r,icon:s,isError:i,isWarning:o,isInfo:l,selectedItem:a,onAccepted:c,onSelected:u,onHighlighted:f,onIconClicked:d,noItemsMessage:h,dataTestId:v,notSelectable:m}){const w=N.useRef(null),[y,g]=N.useState();return N.useEffect(()=>{f==null||f(y)},[f,y]),N.useEffect(()=>{const S=w.current;if(!S)return;const x=()=>{Yd.set(t,S.scrollTop)};return S.addEventListener("scroll",x,{passive:!0}),()=>S.removeEventListener("scroll",x)},[t]),N.useEffect(()=>{w.current&&(w.current.scrollTop=Yd.get(t)||0)},[t]),p.jsx("div",{className:le("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"data-testid":v||t+"-list",children:p.jsxs("div",{className:le("list-view-content",m&&"not-selectable"),tabIndex:0,onKeyDown:S=>{var b;if(a&&S.key==="Enter"){c==null||c(a,e.indexOf(a));return}if(S.key!=="ArrowDown"&&S.key!=="ArrowUp")return;S.stopPropagation(),S.preventDefault();const x=a?e.indexOf(a):-1;let _=x;S.key==="ArrowDown"&&(x===-1?_=0:_=Math.min(x+1,e.length-1)),S.key==="ArrowUp"&&(x===-1?_=e.length-1:_=Math.max(x-1,0));const T=(b=w.current)==null?void 0:b.children.item(_);Gh(T||void 0),f==null||f(void 0),u==null||u(e[_],_),g(void 0)},ref:w,children:[h&&e.length===0&&p.jsx("div",{className:"list-view-empty",children:h}),e.map((S,x)=>{const _=r(S,x);return p.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(S,x),role:"listitem",className:le("list-view-entry",a===S&&"selected",!m&&y===S&&"highlighted",(i==null?void 0:i(S,x))&&"error",(o==null?void 0:o(S,x))&&"warning",(l==null?void 0:l(S,x))&&"info"),onClick:()=>u==null?void 0:u(S,x),onMouseEnter:()=>g(S),onMouseLeave:()=>g(void 0),children:[s&&p.jsx("div",{className:"codicon "+(s(S,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:T=>{T.preventDefault(),T.stopPropagation()},onClick:T=>{T.stopPropagation(),T.preventDefault(),d==null||d(S,x)}}),typeof _=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:_}):_]},(n==null?void 0:n(S,x))||x)})]})})}const OS=bl,$S=({action:t,isLive:e})=>{const n=N.useMemo(()=>{var o;if(!t||!t.log.length)return[];const r=t.log,s=t.context.wallTime-t.context.startTime,i=[];for(let l=0;l0?a=Pe(t.endTime-c):e?a=Pe(Date.now()-s-c):a="-"}i.push({message:r[l].message,time:a})}return i},[t,e]);return n.length?p.jsx(OS,{name:"log",items:n,render:r=>p.jsxs("div",{className:"log-list-item",children:[p.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):p.jsx(Yn,{text:"No log entries"})};function ci(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let s,i={},o=!1,l=e==null?void 0:e.fg,a=e==null?void 0:e.bg;for(;(s=n.exec(t))!==null;){const[,,c,,u]=s;if(c){const f=+c;switch(f){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 7:o=!0;break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:delete i["font-weight"],delete i["font-style"],delete i.opacity,delete i["text-decoration"];break;case 23:delete i["font-weight"],delete i["font-style"],delete i.opacity;break;case 24:delete i["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=Zd[f-30];break;case 39:l=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=Zd[f-40];break;case 49:a=e==null?void 0:e.bg;break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=eh[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=eh[f-100];break}}else if(u){const f={...i},d=o?a:l;d!==void 0&&(f.color=d);const h=o?l:a;h!==void 0&&(f["background-color"]=h),r.push(`${PS(u)}`)}}return r.join("")}const Zd={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},eh={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function PS(t){return t.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function RS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const DS=({error:t})=>{const e=N.useMemo(()=>ci(t),[t]);return p.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})};function FS(t){return N.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}const zS=({errorsModel:t,sdkLanguage:e,revealInSource:n})=>t.errors.size?p.jsx("div",{className:"fill",style:{overflow:"auto"},children:[...t.errors.entries()].map(([r,s])=>{var a;let i,o;const l=(a=s.stack)==null?void 0:a[0];return l&&(i=l.file.replace(/.*[/\\](.*)/,"$1")+":"+l.line,o=l.file+":"+l.line),p.jsxs("div",{children:[p.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)"},children:[s.action&&qu(s.action,{sdkLanguage:e}),i&&p.jsxs("div",{className:"action-location",children:["@ ",p.jsx("span",{title:o,onClick:()=>n(s),children:i})]})]}),p.jsx(DS,{error:r})]},r)})}):p.jsx(Yn,{text:"No errors"}),BS=bl;function US(t,e){const{entries:n}=N.useMemo(()=>{if(!t)return{entries:[]};const s=[];for(const i of t.events){if(i.type==="console"){const o=i.args&&i.args.length?VS(i.args):Ig(i.text),l=i.location.url,c=`${l?l.substring(l.lastIndexOf("/")+1):""}:${i.location.lineNumber}`;s.push({browserMessage:{body:o,location:c},isError:i.messageType==="error",isWarning:i.messageType==="warning",timestamp:i.time})}i.type==="event"&&i.method==="pageError"&&s.push({browserError:i.params.error,isError:!0,isWarning:!1,timestamp:i.time})}for(const i of t.stdio){let o="";i.text&&(o=ci(i.text.trim())||""),i.base64&&(o=ci(atob(i.base64).trim())||""),s.push({nodeMessage:{html:o},isError:i.type==="stderr",isWarning:!1,timestamp:i.timestamp})}return s.sort((i,o)=>i.timestamp-o.timestamp),{entries:s}},[t]);return{entries:N.useMemo(()=>e?n.filter(s=>s.timestamp>=e.minimum&&s.timestamp<=e.maximum):n,[n,e])}}const HS=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?p.jsx("div",{className:"console-tab",children:p.jsx(BS,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:s=>s.isError,isWarning:s=>s.isWarning,render:s=>{const i=Pe(s.timestamp-e.minimum),o=p.jsx("span",{className:"console-time",children:i}),l=s.isError?"status-error":s.isWarning?"status-warning":"status-none",a=s.browserMessage||s.browserError?p.jsx("span",{className:le("codicon","codicon-browser",l),title:"Browser message"}):p.jsx("span",{className:le("codicon","codicon-file",l),title:"Runner message"});let c,u,f,d;const{browserMessage:h,browserError:v,nodeMessage:m}=s;if(h&&(c=h.location,u=h.body),v){const{error:w,value:y}=v;w?(u=w.message,d=w.stack):u=String(y)}return m&&(f=m.html),p.jsxs("div",{className:"console-line",children:[o,a,c&&p.jsx("span",{className:"console-location",children:c}),u&&p.jsx("span",{className:"console-line-message",children:u}),f&&p.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&p.jsx("div",{className:"console-stack",children:d})]})}})}):p.jsx(Yn,{text:"No console entries"});function VS(t){if(t.length===1)return Ig(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let s=0;const i=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(p.jsx("span",{children:a}));let c=0;for(;(o=i.exec(n))!==null;){const u=n.substring(c,o.index);a.push(p.jsx("span",{children:u})),c=o.index+2;const f=o[0][1];if(f==="%")a.push(p.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[s++],h={};typeof(d==null?void 0:d.value)!="string"&&(h.color="var(--vscode-debugTokenExpression-number)"),a.push(p.jsx("span",{style:h,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[s++],h=d?qS(d.preview):{};l.push(p.jsx("span",{style:h,children:a}))}}for(ca[1].toUpperCase());e[l]=o}return e}catch{return{}}}function WS(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Wu=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:s,onClick:i})=>p.jsx("div",{className:le("toolbar",t&&"no-shadow",n&&"no-min-height",r,s&&"toolbar-sidebar-background"),onClick:i,children:e}),Pc=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:s,dataTestId:i,mode:o})=>{const l=N.useId();return e||(e=t[0].id),o||(o="default"),p.jsx("div",{className:"tabbed-pane","data-testid":i,children:p.jsxs("div",{className:"vbox",children:[p.jsxs(Wu,{children:[r&&p.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(a=>p.jsx(jg,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:e===a.id,onSelect:n},a.id))]}),o==="select"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:p.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(t[a.currentTarget.selectedIndex].id)},children:t.map(a=>{let c="";return a.count&&(c=` (${a.count})`),a.errorCount&&(c=` (${a.errorCount})`),p.jsxs("option",{value:a.id,selected:a.id===e,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,c]},a.id)})})}),s&&p.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...s]})]}),t.map(a=>{const c="tab-content tab-"+a.id;if(a.component)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,style:{display:e===a.id?"inherit":"none"},children:a.component},a.id);if(e===a.id)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,children:a.render()},a.id)})]})})},jg=({id:t,title:e,count:n,errorCount:r,selected:s,onSelect:i,ariaControls:o})=>p.jsxs("div",{className:le("tabbed-pane-tab",s&&"selected"),onClick:()=>i==null?void 0:i(t),role:"tab",title:e,"aria-controls":o,children:[p.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&p.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&p.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),KS="modulepreload",QS=function(t,e){return new URL(t,e).href},th={},XS=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=QS(c,r),c in th)return;th[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(!!r)for(let v=o.length-1;v>=0;v--){const m=o[v];if(m.href===c&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":KS,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((v,m)=>{h.addEventListener("load",v),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return e().catch(i)})},GS=20,Wr=({text:t,language:e,mimeType:n,linkify:r,readOnly:s,highlight:i,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:c,wrapLines:u,onChange:f,dataTestId:d,placeholder:h})=>{const[v,m]=Xn(),[w]=N.useState(XS(()=>import("./codeMirrorModule-aLkSUGpW.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),y=N.useRef(null),[g,S]=N.useState();return N.useEffect(()=>{(async()=>{var E,k;const x=await w;YS(x);const _=m.current;if(!_)return;const T=ex(e)||ZS(n)||(r?"text/linkified":"");if(y.current&&T===y.current.cm.getOption("mode")&&!!s===y.current.cm.getOption("readOnly")&&l===y.current.cm.getOption("lineNumbers")&&u===y.current.cm.getOption("lineWrapping")&&h===y.current.cm.getOption("placeholder"))return;(k=(E=y.current)==null?void 0:E.cm)==null||k.getWrapperElement().remove();const b=x(_,{value:"",mode:T,readOnly:!!s,lineNumbers:l,lineWrapping:u,placeholder:h});return y.current={cm:b},a&&b.focus(),S(b),b})()},[w,g,m,e,n,r,l,u,s,a,h]),N.useEffect(()=>{y.current&&y.current.cm.setSize(v.width,v.height)},[v]),N.useLayoutEffect(()=>{var T;if(!g)return;let x=!1;if(g.getValue()!==t&&(g.setValue(t),x=!0,c&&(g.execCommand("selectAll"),g.focus())),x||JSON.stringify(i)!==JSON.stringify(y.current.highlight)){for(const k of y.current.highlight||[])g.removeLineClass(k.line-1,"wrap");for(const k of i||[])g.addLineClass(k.line-1,"wrap",`source-line-${k.type}`);for(const k of y.current.widgets||[])g.removeLineWidget(k);for(const k of y.current.markers||[])k.clear();const b=[],E=[];for(const k of i||[]){if(k.type!=="subtle-error"&&k.type!=="error")continue;const A=(T=y.current)==null?void 0:T.cm.getLine(k.line-1);if(A){const L={};L.title=k.message||"",E.push(g.markText({line:k.line-1,ch:0},{line:k.line-1,ch:k.column||A.length},{className:"source-line-error-underline",attributes:L}))}if(k.type==="error"){const L=document.createElement("div");L.innerHTML=ci(k.message||""),L.className="source-line-error-widget",b.push(g.addLineWidget(k.line,L,{above:!0,coverGutter:!1}))}}y.current.highlight=i,y.current.widgets=b,y.current.markers=E}typeof o=="number"&&y.current.cm.lineCount()>=o&&g.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let _;return f&&(_=()=>f(g.getValue()),g.on("change",_)),()=>{_&&g.off("change",_)}},[g,t,i,o,c,f]),p.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:m,onClick:JS})};function JS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let nh=!1;function YS(t){nh||(nh=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Jh,token:"linkified"}]}))}function ZS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function ex(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}async function tx(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function s(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^ + +`)+d}function i(f){function d(h){let m=h.charCodeAt(0).toString(16);for(;m.length<4;)m="0"+m;return"\\u"+m}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const o=e==="win"?s:i;n.push(o(t.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],c=await Mg(t);c&&(a.push("--data-raw "+o(c)),r.add("content-length"),l="POST"),t.request.method!==l&&n.push("-X "+o(t.request.method));const u=t.request.headers;for(let f=0;f=3?e==="win"?` ^ + `:` \\ + `:" ")}async function nx(t,e=0){const n=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),r=new Set(["cookie","authorization"]),s=JSON.stringify(t.request.url),i=t.request.headers,o=i.reduce((v,m)=>{const w=m.name;return!n.has(w.toLowerCase())&&!w.includes(":")&&v.append(w,m.value),v},new Headers),l={};for(const v of o)l[v[0]]=v[1];const a=t.request.cookies.length||i.some(({name:v})=>r.has(v.toLowerCase()))?"include":"omit",c=i.find(({name:v})=>v.toLowerCase()==="referer"),u=c?c.value:void 0,f=await Mg(t),d={headers:Object.keys(l).length?l:void 0,referrer:u,body:f,method:t.request.method,mode:"cors"};if(e===1){const v=i.find(w=>w.name.toLowerCase()==="cookie"),m={};delete d.mode,v&&(m.cookie=v.value),u&&(delete d.referrer,m.Referer=u),Object.keys(m).length&&(d.headers={...l,...m})}else d.credentials=a;const h=JSON.stringify(d,null,2);return`fetch(${s}, ${h});`}async function Mg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class rx{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const s=new URL(e.url),i=`${s.origin}${s.pathname}`,o={};["delete","get","head","post","put","patch"].includes(r)||(o.method=r,r="fetch"),s.searchParams.size&&(o.params=Object.fromEntries(s.searchParams.entries())),n&&(o.data=n),e.headers.length&&(o.headers=Object.fromEntries(e.headers.map(c=>[c.name,c.value])));const l=[`'${i}'`];return Object.keys(o).length>0&&l.push(this.prettyPrintObject(o)),`await page.request.${r}(${l.join(", ")});`}prettyPrintObject(e,n=2,r=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[ +${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, +`)} +${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{ +${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(l)?l:this.stringLiteral(l);return`${i}${u}: ${c}`}).join(`, +`)} +${s}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(` +`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class sx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),i=[`"${`${r.origin}${r.pathname}`}"`];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`method="${o}"`),o="fetch"),r.searchParams.size&&i.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&i.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&i.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(a=>[a.name,a.value])))}`);const l=i.length===1?i[0]:` +${i.map(a=>this.indent(a,2)).join(`, +`)} +`;return`await page.request.${o}(${l})`}indent(e,n){return e.split(` +`).map(r=>" ".repeat(n)+r).join(` +`)}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[ +${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, +`)} +${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{ +${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1);return`${i}${this.stringLiteral(l)}: ${c}`}).join(`, +`)} +${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ix{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=`${r.origin}${r.pathname}`,i={},o=[];let l=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(l)||(i.Method=l,l="fetch"),r.searchParams.size&&(i.Params=Object.fromEntries(r.searchParams.entries())),n&&(i.Data=n),e.headers.length&&(i.Headers=Object.fromEntries(e.headers.map(u=>[u.name,u.value])));const a=[`"${s}"`];return Object.keys(i).length>0&&a.push(this.prettyPrintObject(i)),`${o.join(` +`)}${o.length?` +`:""}await request.${this.toFunctionName(l)}(${a.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=2,r=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`new object[] { +${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, +`)} +${l}}`}if(Object.keys(e).length===0)return"new {}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`new() { +${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=r===0?l:`[${this.stringLiteral(l)}]`;return`${i}${u} = ${c}`}).join(`, +`)} +${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ox{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=[`"${r.origin}${r.pathname}"`],i=[];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`setMethod("${o}")`),o="fetch");for(const[l,a]of r.searchParams)i.push(`setQueryParam(${this.stringLiteral(l)}, ${this.stringLiteral(a)})`);n&&i.push(`setData(${this.stringLiteral(n)})`);for(const l of e.headers)i.push(`setHeader(${this.stringLiteral(l.name)}, ${this.stringLiteral(l.value)})`);return i.length>0&&s.push(`RequestOptions.create() + .${i.join(` + .`)} +`),`request.${o}(${s.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function lx(t){if(t==="javascript")return new rx;if(t==="python")return new sx;if(t==="csharp")return new ix;if(t==="java")return new ox;throw new Error("Unsupported language: "+t)}const ax=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[s,i]=N.useState("request");return p.jsx(Pc,{dataTestId:"network-request-details",leftToolbar:[p.jsx(bt,{icon:"close",title:"Close",onClick:r},"close")],tabs:[{id:"request",title:"Request",render:()=>p.jsx(cx,{resource:t,sdkLanguage:e,startTimeOffset:n})},{id:"response",title:"Response",render:()=>p.jsx(ux,{resource:t})},{id:"body",title:"Body",render:()=>p.jsx(fx,{resource:t})}],selectedTab:s,setSelectedTab:i})},cx=({resource:t,sdkLanguage:e,startTimeOffset:n})=>{const[r,s]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.request.postData){const o=t.request.headers.find(a=>a.name.toLowerCase()==="content-type"),l=o?o.value:"";if(t.request.postData._sha1){const a=await fetch(`sha1/${t.request.postData._sha1}`);s({text:Rc(await a.text(),l),mimeType:l})}else s({text:Rc(t.request.postData.text,l),mimeType:l})}else s(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"General"}),p.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),p.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&p.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",p.jsx("span",{className:hx(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(i=>`${i.name}: ${i.value}`).join(` +`)})]}):null,p.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(i=>`${i.name}: ${i.value}`).join(` +`)}),p.jsx("div",{className:"network-request-details-header",children:"Time"}),p.jsx("div",{className:"network-request-details-general",children:`Start: ${Pe(n)}`}),p.jsx("div",{className:"network-request-details-general",children:`Duration: ${Pe(t.time)}`}),p.jsxs("div",{className:"network-request-details-copy",children:[p.jsx(wa,{description:"Copy as cURL",value:()=>tx(t)}),p.jsx(wa,{description:"Copy as Fetch",value:()=>nx(t)}),p.jsx(wa,{description:"Copy as Playwright",value:async()=>lx(e).generatePlaywrightRequestCall(t.request,r==null?void 0:r.text)})]}),r&&p.jsx("div",{className:"network-request-details-header",children:"Request Body"}),r&&p.jsx(Wr,{text:r.text,mimeType:r.mimeType,readOnly:!0,lineNumbers:!0})]})},ux=({resource:t})=>p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(` +`)})]}),fx=({resource:t})=>{const[e,n]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.response.content._sha1){const s=t.response.content.mimeType.includes("image"),i=t.response.content.mimeType.includes("font"),o=await fetch(`sha1/${t.response.content._sha1}`);if(s){const l=await o.blob(),a=new FileReader,c=new Promise(u=>a.onload=u);a.readAsDataURL(l),n({dataUrl:(await c).target.result})}else if(i){const l=await o.arrayBuffer();n({font:l})}else{const l=Rc(await o.text(),t.response.content.mimeType);n({text:l,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&p.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&p.jsx(dx,{font:e.font}),e&&e.dataUrl&&p.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&p.jsx(Wr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},dx=({font:t})=>{const[e,n]=N.useState(!1);return N.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?p.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):p.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",p.jsx("br",{}),"NOPQRSTUVWXYZ",p.jsx("br",{}),"abcdefghijklm",p.jsx("br",{}),"nopqrstuvwxyz",p.jsx("br",{}),"1234567890"]})};function hx(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function Rc(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const Og=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(tt.useEffect(()=>{const s=document.createElement("div");return s.style.position="fixed",s.style.top="0",s.style.right="0",s.style.bottom="0",s.style.left="0",s.style.zIndex="9999",s.style.cursor=t,document.body.appendChild(s),e&&s.addEventListener("mousemove",e),n&&s.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&s.removeEventListener("mousemove",e),n&&s.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(s)}},[t,e,n,r]),p.jsx(p.Fragment,{})),px={position:"absolute",top:0,right:0,bottom:0,left:0},$g=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:s,minColumnWidth:i})=>{const o=i||0,[l,a]=tt.useState(null),[c,u]=Xn(),f={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-s)/2,borderRightWidth:t==="horizontal"?(7-s)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-s)/2,borderLeftWidth:t==="horizontal"?(7-s)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return p.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-s)/2,zIndex:100,pointerEvents:"none"},ref:u,children:[!!l&&p.jsx(Og,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>a(null),onPaneMouseMove:d=>{if(!d.buttons)a(null);else if(l){const h=t==="horizontal"?d.clientX-l.clientX:d.clientY-l.clientY,v=l.offset+h,m=l.index>0?e[l.index-1]:0,w=t==="horizontal"?c.width:c.height,y=Math.min(Math.max(m+o,v),w-o)-e[l.index];for(let g=l.index;gp.jsx("div",{style:{...f,top:t==="horizontal"?0:d,left:t==="horizontal"?d:0,pointerEvents:"initial"},onMouseDown:v=>a({clientX:v.clientX,clientY:v.clientY,offset:d,index:h}),children:p.jsx("div",{style:{...px,background:r}})},h))]})};function mx(t){const[e,n]=N.useState([]);N.useEffect(()=>{const i=[];for(let o=0;o{var o,l;(l=t.setSorting)==null||l.call(t,{by:i,negate:((o=t.sorting)==null?void 0:o.by)===i?!t.sorting.negate:!1})},[t]);return p.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[p.jsx($g,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),p.jsxs("div",{className:"vbox",children:[p.jsx("div",{className:"grid-view-header",children:t.columns.map((i,o)=>p.jsxs("div",{className:"grid-view-header-cell "+gx(i,t.sorting),style:{width:ot.setSorting&&s(i),children:[p.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(i)}),p.jsx("span",{className:"codicon codicon-triangle-up"}),p.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(i)))}),p.jsx(bl,{name:t.name,items:t.items,id:t.id,render:(i,o)=>p.jsx(p.Fragment,{children:t.columns.map((l,a)=>{const{body:c,title:u}=t.render(i,l,o);return p.jsx("div",{className:`grid-view-cell grid-view-column-${String(l)}`,title:u,style:{width:ap.jsxs("div",{className:"network-filters",children:[p.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),p.jsx("div",{className:"network-filters-resource-types",children:yx.map(n=>p.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),Sx=mx;function xx(t,e){const n=N.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(o=>e?!!o._monotonicTime&&o._monotonicTime>=e.minimum&&o._monotonicTime<=e.maximum:!0),[t,e]),r=N.useMemo(()=>new Nx(t),[t]);return{resources:n,contextIdMap:r}}const _x=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[s,i]=N.useState(void 0),[o,l]=N.useState(void 0),[a,c]=N.useState(vx),{renderedEntries:u}=N.useMemo(()=>{const m=e.resources.map(w=>Cx(w,t,e.contextIdMap)).filter(Mx(a));return s&&Lx(m,s),{renderedEntries:m}},[e.resources,e.contextIdMap,a,s,t]),[f,d]=N.useState(()=>new Map(Pg().map(m=>[m,Ex(m)]))),h=N.useCallback(m=>{c(m),l(void 0)},[]);if(!e.resources.length)return p.jsx(Yn,{text:"No network calls"});const v=p.jsx(Sx,{name:"network",items:u,selectedItem:o,onSelected:m=>l(m),onHighlighted:m=>n==null?void 0:n(m==null?void 0:m.resource),columns:Tx(!!o,u),columnTitle:kx,columnWidths:f,setColumnWidths:d,isError:m=>m.status.code>=400||m.status.code===-1,isInfo:m=>!!m.route,render:(m,w)=>bx(m,w),sorting:s,setSorting:i});return p.jsxs(p.Fragment,{children:[p.jsx(wx,{filterState:a,onFilterStateChange:h}),!o&&v,o&&p.jsx(Qo,{sidebarSize:f.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:p.jsx(ax,{resource:o.resource,sdkLanguage:r,startTimeOffset:o.start,onClose:()=>l(void 0)}),sidebar:v})]})},kx=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",Ex=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function Tx(t,e){if(t){const r=["name"];return rh(e)&&r.unshift("contextId"),r}let n=Pg();return rh(e)||(n=n.filter(r=>r!=="contextId")),n}function Pg(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const bx=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:Pe(t.duration)}:e==="size"?{body:kv(t.size)}:e==="start"?{body:Pe(t.start)}:e==="route"?{body:t.route}:{body:""};class Nx{constructor(e){W(this,"_pagerefToShortId",new Map);W(this,"_contextToId",new Map);W(this,"_lastPageId",0);W(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Ko(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function rh(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const Cx=(t,e,n)=>{const r=Ax(t);let s;try{const l=new URL(t.request.url);s=l.pathname.substring(l.pathname.lastIndexOf("/")+1),s||(s=l.host)}catch{s=t.request.url}let i=t.response.content.mimeType;const o=i.match(/^(.*);\s*charset=.*$/);return o&&(i=o[1]),{name:{name:s,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:i,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t)}};function Ax(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function Lx(t,e){const n=Ix(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function Ix(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,s=n.method;return r.localeCompare(s)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const jx={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function Mx({searchValue:t,resourceType:e}){return n=>{const r=jx[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}const sh={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const s=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let i=s.iterateNext();i;i=s.iterateNext())i.nodeType===Node.ELEMENT_NODE&&n.push(i);return n}};let Rg="";function Ox(t){Rg=t}function Nl(t,e){for(;e;){if(t.contains(e))return!0;e=Fg(e)}return!1}function $e(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Dg(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Fg(t){for(;t.parentElement;)t=t.parentElement;return $e(t)}function Ls(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Fg(t)}}function Zn(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function zg(t,e){if(e=e??Zn(t),!e)return!0;if(Element.prototype.checkVisibility&&Rg!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function $r(t){const e=Zn(t);if(!e)return!0;if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===1&&$r(r)||r.nodeType===3&&Bg(r))return!0;return!1}if(!zg(t,e))return!1;const n=t.getBoundingClientRect();return n.width>0&&n.height>0}function Bg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Se(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function ih(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const oh="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",$x=new Map([["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",new Set(["generic"])]]);function Ug(t,e){return[...$x].some(([n,r])=>!(r!=null&&r.has(e||""))&&t.hasAttribute(n))}function Hg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function Px(t){return!ty(t)&&(Rx(t)||Hg(t))}function Rx(t){const e=Se(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const Sa={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:t=>Ls(t,oh)?null:"contentinfo",FORM:t=>ih(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Ls(t,oh)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!Ug(t)&&!Hg(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=es(t,t.getAttribute("list"))[0];return n&&Se(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:Jx[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SECTION:t=>ih(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},Dx={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function lh(t){var r;const e=((r=Sa[Se(t)])==null?void 0:r.call(Sa,t))||"";if(!e)return null;let n=t;for(;n;){const s=$e(n),i=Dx[Se(n)];if(!i||!s||!i.includes(Se(s)))break;const o=Yo(s);if((o==="none"||o==="presentation")&&!Vg(s,o))return o;n=s}return e}const Fx=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function Yo(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>Fx.includes(n))||null}function Vg(t,e){return Ug(t,e)||Px(t)}function ye(t){const e=Yo(t);if(!e)return lh(t);if(e==="none"||e==="presentation"){const n=lh(t);if(Vg(t,n))return n}return e}function qg(t){return t===null?void 0:t.toLowerCase()==="true"}function Wg(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Se(t))}function ct(t){if(Wg(t))return!0;const e=Zn(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let s=t.firstChild;s;s=s.nextSibling)if(s.nodeType===1&&!ct(s)||s.nodeType===3&&Bg(s))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!zg(t,e)?!0:Kg(t)}function Kg(t){let e=on==null?void 0:on.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=Zn(t);e=!n||n.display==="none"||qg(t.getAttribute("aria-hidden"))===!0}if(!e){const n=$e(t);n&&(e=Kg(n))}on==null||on.set(t,e)}return e}function es(t,e){if(!e)return[];const n=Dg(t);if(!n)return[];try{const r=e.split(" ").filter(i=>!!i),s=new Set;for(const i of r){const o=n.querySelector("#"+CSS.escape(i));o&&s.add(o)}return[...s]}catch{return[]}}function zt(t){return t.trim()}function Hs(t){return t.split(" ").map(e=>e.replace(/\r\n/g,` +`).replace(/\s\s*/g," ")).join(" ").trim()}function ah(t,e){const n=[...t.querySelectorAll(e)];for(const r of es(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Zo(t,e){const n=e==="::before"?rf:sf;if(n!=null&&n.has(t))return(n==null?void 0:n.get(t))||"";const r=Zn(t,e),s=zx(r);return n&&n.set(t,s),s}function zx(t){if(!t||t.display==="none"||t.visibility==="hidden")return"";const e=t.content;if(e[0]==="'"&&e[e.length-1]==="'"||e[0]==='"'&&e[e.length-1]==='"'){const n=e.substring(1,e.length-1);return(t.display||"inline")!=="inline"?" "+n+" ":n}return""}function Qg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=es(t,e);return n.length?n:null}function Bx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(t);return n||r}function ui(t,e){const n=e?ef:Zu;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ye(t)||"")||(r=Hs(_t(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function ch(t,e){const n=e?nf:tf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const s=es(t,t.getAttribute("aria-describedby"));r=Hs(s.map(i=>_t(i,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:i,hidden:ct(i)}})).join(" "))}else t.hasAttribute("aria-description")?r=Hs(t.getAttribute("aria-description")||""):r=Hs(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}const Ux=["application","checkbox","combobox","gridcell","listbox","radiogroup","slider","spinbutton","textbox","tree","columnheader","rowheader","searchbox","switch","treegrid"];function Hx(t){const e=ye(t)||"";if(!e||!Ux.includes(e))return"false";const n=t.getAttribute("aria-invalid");return!n||n.trim()===""||n.toLocaleLowerCase()==="false"?"false":n==="true"||n==="grammar"||n==="spelling"?n:"true"}function Vx(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function qx(t){const e=kr;let n=kr==null?void 0:kr.get(t);if(n===void 0){n="";const r=Hx(t)!=="false",s=Vx(t);if(r||s){const i=t.getAttribute("aria-errormessage");n=es(t,i).map(a=>Hs(_t(a,{visitedElements:new Set,embeddedInDescribedBy:{element:a,hidden:ct(a)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function _t(t,e){var a,c,u,f;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const d=!!((a=e.embeddedInLabelledBy)!=null&&a.hidden)||!!((c=e.embeddedInDescribedBy)!=null&&c.hidden)||!!((u=e.embeddedInNativeTextAlternative)!=null&&u.hidden)||!!((f=e.embeddedInLabel)!=null&&f.hidden);if(Wg(t)||!d&&ct(t))return e.visitedElements.add(t),""}const r=Qg(t);if(!e.embeddedInLabelledBy){const d=(r||[]).map(h=>_t(h,{...e,embeddedInLabelledBy:{element:h,hidden:ct(h)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(d)return d}const s=ye(t)||"",i=Se(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const d=[...t.labels||[]].includes(t),h=(r||[]).includes(t);if(!d&&!h){if(s==="textbox")return e.visitedElements.add(t),i==="INPUT"||i==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(s)){e.visitedElements.add(t);let v;if(i==="SELECT")v=[...t.selectedOptions],!v.length&&t.options.length&&v.push(t.options[0]);else{const m=s==="combobox"?ah(t,"*").find(w=>ye(w)==="listbox"):t;v=m?ah(m,'[aria-selected="true"]').filter(w=>ye(w)==="option"):[]}return!v.length&&i==="INPUT"?t.value:v.map(m=>_t(m,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(s))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(s))return e.visitedElements.add(t),""}}const o=t.getAttribute("aria-label")||"";if(zt(o))return e.visitedElements.add(t),o;if(!["presentation","none"].includes(s)){if(i==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const d=t.value||"";return zt(d)?d:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(i==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const d=t.labels||[];if(d.length&&!e.embeddedInLabelledBy)return Bi(d,e);const h=t.getAttribute("alt")||"";if(zt(h))return h;const v=t.getAttribute("title")||"";return zt(v)?v:"Submit"}if(!r&&i==="BUTTON"){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e)}if(!r&&i==="OUTPUT"){e.visitedElements.add(t);const d=t.labels||[];return d.length?Bi(d,e):t.getAttribute("title")||""}if(!r&&(i==="TEXTAREA"||i==="SELECT"||i==="INPUT")){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e);const h=i==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||i==="TEXTAREA",v=t.getAttribute("placeholder")||"",m=t.getAttribute("title")||"";return!h||m?m:v}if(!r&&i==="FIELDSET"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="LEGEND")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(!r&&i==="FIGURE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="FIGCAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(i==="IMG"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="TABLE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="CAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});const d=t.getAttribute("summary")||"";if(d)return d}if(i==="AREA"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let d=t.firstElementChild;d;d=d.nextElementSibling)if(Se(d)==="TITLE"&&d.ownerSVGElement)return _t(d,{...n,embeddedInLabelledBy:{element:d,hidden:ct(d)}})}if(t.ownerSVGElement&&i==="A"){const d=t.getAttribute("xlink:title")||"";if(zt(d))return e.visitedElements.add(t),d}}const l=i==="SUMMARY"&&!["presentation","none"].includes(s);if(Bx(s,e.embeddedInTargetElement==="descendant")||l||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const d=Wx(t,n);if(e.embeddedInTargetElement==="self"?zt(d):d)return d}if(!["presentation","none"].includes(s)||i==="IFRAME"){e.visitedElements.add(t);const d=t.getAttribute("title")||"";if(zt(d))return d}return e.visitedElements.add(t),""}function Wx(t,e){const n=[],r=(i,o)=>{var l;if(!(o&&i.assignedSlot))if(i.nodeType===1){const a=((l=Zn(i))==null?void 0:l.display)||"inline";let c=_t(i,e);(a!=="inline"||i.nodeName==="BR")&&(c=" "+c+" "),n.push(c)}else i.nodeType===3&&n.push(i.textContent||"")};n.push(Zo(t,"::before"));const s=t.nodeName==="SLOT"?t.assignedNodes():[];if(s.length)for(const i of s)r(i,!1);else{for(let i=t.firstChild;i;i=i.nextSibling)r(i,!0);if(t.shadowRoot)for(let i=t.shadowRoot.firstChild;i;i=i.nextSibling)r(i,!0);for(const i of es(t,t.getAttribute("aria-owns")))r(i,!0)}return n.push(Zo(t,"::after")),n.join("")}const Ku=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Xg(t){return Se(t)==="OPTION"?t.selected:Ku.includes(ye(t)||"")?qg(t.getAttribute("aria-selected"))===!0:!1}const Qu=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Gg(t){const e=Xu(t,!0);return e==="error"?!1:e}function Kx(t){return Xu(t,!0)}function Qx(t){return Xu(t,!1)}function Xu(t,e){const n=Se(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(Qu.includes(ye(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const Xx=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function Gx(t){const e=Se(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):Xx.includes(ye(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const Gu=["button"];function Jg(t){if(Gu.includes(ye(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Ju=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Yg(t){if(Se(t)==="DETAILS")return t.open;if(Ju.includes(ye(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Yu=["heading","listitem","row","treeitem"];function Zg(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Se(t)];if(e)return e;if(Yu.includes(ye(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const ey=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function el(t){return ty(t)||ry(t)}function ty(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(t.tagName)&&(t.hasAttribute("disabled")||ny(t))}function ny(t){return t?Se(t)==="FIELDSET"&&t.hasAttribute("disabled")?!0:ny(t.parentElement):!1}function ry(t){if(!t)return!1;if(ey.includes(ye(t)||"")){const e=(t.getAttribute("aria-disabled")||"").toLowerCase();if(e==="true")return!0;if(e==="false")return!1}return ry($e(t))}function Bi(t,e){return[...t].map(n=>_t(n,{...e,embeddedInLabel:{element:n,hidden:ct(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}let Zu,ef,tf,nf,kr,on,rf,sf,sy=0;function of(){++sy,Zu??(Zu=new Map),ef??(ef=new Map),tf??(tf=new Map),nf??(nf=new Map),kr??(kr=new Map),on??(on=new Map),rf??(rf=new Map),sf??(sf=new Map)}function lf(){--sy||(Zu=void 0,ef=void 0,tf=void 0,nf=void 0,kr=void 0,on=void 0,rf=void 0,sf=void 0)}const Jx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function iy(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return oy(t,e)}function oy(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op===""?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function af(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Ke(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!af(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:De(e.value),immediate:[e.value]};else{for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.TEXT_NODE)n.full+=s.nodeValue||"",r+=s.nodeValue||"";else{if(s.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",s.nodeType===Node.ELEMENT_NODE&&(n.full+=Ke(t,s).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Ke(t,e.shadowRoot).full),n.full&&(n.normalized=De(n.full))}}t.set(e,n)}return n}function Cl(t,e,n){if(af(e)||!n(Ke(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Ke(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Ke(t,e.shadowRoot))?"selfAndChildren":"self"}function ly(t,e){const n=Qg(e);if(n)return n.map(i=>Ke(t,i));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:De(r),immediate:[r]}];const s=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||s){const i=e.labels;if(i)return[...i].map(o=>Ke(t,o))}return[]}function uh(t){return t.displayName||t.name||"Anonymous"}function Yx(t){if(t.type)switch(typeof t.type){case"function":return uh(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?uh(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function Zx(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function e_(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var s;const r=(s=n._currentElement)==null?void 0:s.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function t_(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function ay(t){var r;const e={key:Zx(t),name:Yx(t),children:e_(t).map(ay),rootElements:[],props:t_(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const s of e.children)e.rootElements.push(...s.rootElements);return e}function cy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)cy(r,e,n);return n}function uy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const s=r.currentNode,i=s,o=Object.keys(i).find(a=>a.startsWith("__reactContainer")&&i[a]!==null);if(o)e.push(i[o].stateNode.current);else{const a="_reactRootContainer";i.hasOwnProperty(a)&&i[a]!==null&&e.push(i[a]._internalRoot.current)}if(s instanceof Element&&s.hasAttribute("data-reactroot"))for(const a of Object.keys(s))(a.startsWith("__reactInternalInstance")||a.startsWith("__reactFiber"))&&e.push(s[a]);const l=s instanceof Element?s.shadowRoot:null;l&&uy(l,e)}while(r.nextNode());return e}const n_={queryAll(t,e){const{name:n,attributes:r}=Un(e,!1),o=uy(t.ownerDocument||t).map(a=>ay(a)).map(a=>cy(a,c=>{const u=c.props??{};if(c.key!==void 0&&(u.key=c.key),n&&c.name!==n||c.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of r)if(!iy(u,f))return!1;return!0})).flat(),l=new Set;for(const a of o)for(const c of a.rootElements)l.add(c);return[...l]}};function fy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function r_(t,e){return e?e.toUpperCase():""}const s_=/(?:^|[-_/])(\w)/g,dy=t=>t&&t.replace(s_,r_);function i_(t){function e(u){const f=u.name||u._componentTag||u.__playwright_guessedName;if(f)return f;const d=u.__file;if(d)return dy(fy(d,".vue"))}function n(u,f){return u.type.__playwright_guessedName=f,f}function r(u){var d,h,v,m;const f=e(u.type||{});if(f)return f;if(u.root===u)return"Root";for(const w in(h=(d=u.parent)==null?void 0:d.type)==null?void 0:h.components)if(((v=u.parent)==null?void 0:v.type.components[w])===u.type)return n(u,w);for(const w in(m=u.appContext)==null?void 0:m.components)if(u.appContext.components[w]===u.type)return n(u,w);return"Anonymous Component"}function s(u){return u._isBeingDestroyed||u.isUnmounted}function i(u){return u.subTree.type.toString()==="Symbol(Fragment)"}function o(u){const f=[];return u.component&&f.push(u.component),u.suspense&&f.push(...o(u.suspense.activeBranch)),Array.isArray(u.children)&&u.children.forEach(d=>{d.component?f.push(d.component):f.push(...o(d))}),f.filter(d=>{var h;return!s(d)&&!((h=d.type.devtools)!=null&&h.hide)})}function l(u){return i(u)?a(u.subTree):[u.subTree.el]}function a(u){if(!u.children)return[];const f=[];for(let d=0,h=u.children.length;d!!o.component).map(o=>o.component):[]}function s(i){return{name:n(i),children:r(i).map(s),rootElements:[i.$el],props:i._props}}return s(t)}function hy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)hy(r,e,n);return n}function py(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),s=new Set;do{const i=r.currentNode;i.__vue__&&s.add(i.__vue__.$root),i.__vue_app__&&i._vnode&&i._vnode.component&&e.push({root:i._vnode.component,version:3});const o=i instanceof Element?i.shadowRoot:null;o&&py(o,e)}while(r.nextNode());for(const i of s)e.push({version:2,root:i});return e}const l_={queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:s}=Un(e,!1),l=py(n).map(c=>c.version===3?i_(c.root):o_(c.root)).map(c=>hy(c,u=>{if(r&&u.name!==r||u.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of s)if(!iy(u.props,f))return!1;return!0})).flat(),a=new Set;for(const c of l)for(const u of c.rootElements)a.add(u);return[...a]}},my=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];my.sort();function Ss(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function sr(t,e){if(t.op!==""&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function ir(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function a_(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ss(r.name,Qu,e),sr(r,[!0,!1,"mixed"]),ir(r,["","="]),n.checked=r.op===""?!0:r.value;break}case"pressed":{Ss(r.name,Gu,e),sr(r,[!0,!1,"mixed"]),ir(r,["","="]),n.pressed=r.op===""?!0:r.value;break}case"selected":{Ss(r.name,Ku,e),sr(r,[!0,!1]),ir(r,["","="]),n.selected=r.op===""?!0:r.value;break}case"expanded":{Ss(r.name,Ju,e),sr(r,[!0,!1]),ir(r,["","="]),n.expanded=r.op===""?!0:r.value;break}case"level":{if(Ss(r.name,Yu,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');n.level=r.value;break}case"disabled":{sr(r,[!0,!1]),ir(r,["","="]),n.disabled=r.op===""?!0:r.value;break}case"name":{if(r.op==="")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{sr(r,[!0,!1]),ir(r,["","="]),n.includeHidden=r.op===""?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${my.map(s=>`"${s}"`).join(", ")}.`)}return n}function c_(t,e,n){const r=[],s=o=>{if(ye(o)===e.role&&!(e.selected!==void 0&&Xg(o)!==e.selected)&&!(e.checked!==void 0&&Gg(o)!==e.checked)&&!(e.pressed!==void 0&&Jg(o)!==e.pressed)&&!(e.expanded!==void 0&&Yg(o)!==e.expanded)&&!(e.level!==void 0&&Zg(o)!==e.level)&&!(e.disabled!==void 0&&el(o)!==e.disabled)&&!(!e.includeHidden&&ct(o))){if(e.name!==void 0){const l=De(ui(o,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=De(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!oy(l,{name:"",jsonPath:[],op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(o)}},i=o=>{const l=[];o.shadowRoot&&l.push(o.shadowRoot);for(const a of o.querySelectorAll("*"))s(a),a.shadowRoot&&l.push(a.shadowRoot);l.forEach(i)};return i(t),r}function fh(t){return{queryAll:(e,n)=>{const r=Un(n,!0),s=r.name.toLowerCase();if(!s)throw new Error("Role must not be empty");const i=a_(r.attributes,s);of();try{return c_(e,i,t)}finally{lf()}}}}function u_(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function f_(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function d_(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function h_(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function p_(t,e,n){const r=n===void 0?50:n;let s=0;return t.left-e.right>=0&&(s+=t.left-e.right),e.left-t.right>=0&&(s+=e.left-t.right),e.top-t.bottom>=0&&(s+=e.top-t.bottom),t.top-e.bottom>=0&&(s+=t.top-e.bottom),s>r?void 0:s}const m_=["left-of","right-of","above","below","near"];function gy(t,e,n,r){const s=e.getBoundingClientRect(),i={"left-of":f_,"right-of":u_,above:d_,below:h_,near:p_}[t];let o;for(const l of n){if(l===e)continue;const a=i(s,l.getBoundingClientRect(),r);a!==void 0&&(o===void 0||ar.every((c,u)=>a.rest[u]===c));if(o)return o.result;const l=s();return i.push({rest:r,result:l}),l}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,n,r){const s=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[s,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(s)?this._matchesEngine(Is,e,s,r):(this._hasScopeClause(s)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,s.simples[s.simples.length-1].selector,r)?this._matchesParents(e,s,s.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Is,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const s=this._scoreMap;this._scoreMap=new Map;let i=this._querySimple(e,r.simples[r.simples.length-1].selector);return i=i.filter(o=>this._matchesParents(o,r,r.simples.length-2,e)),this._scoreMap.size&&i.sort((o,l)=>{const a=this._scoreMap.get(o),c=this._scoreMap.get(l);return a===c?0:a===void 0?1:c===void 0?-1:a-c}),this._scoreMap=s,i})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=$e(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const s of n.functions)if(!this._matchesEngine(this._getEngine(s.name),e,s.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const s=n.functions;r==="*"&&s.length&&(r=void 0);let i,o=-1;r!==void 0?i=this._queryCSS(e,r):(o=s.findIndex(l=>this._getEngine(l.name).query!==void 0),o===-1&&(o=0),i=this._queryEngine(this._getEngine(s[o].name),e,s[o].args));for(let l=0;lthis._matchesEngine(a,c,s[l].args,e)))}for(let l=0;lthis._matchesEngine(a,c,s[l].args,e)))}return i}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,s){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,s.scope,s.pierceShadow,s.originalScope],()=>{const{selector:i,combinator:o}=n.simples[r];if(o===">"){const l=Ui(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o==="+"){const l=xa(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o===""){let l=Ui(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}if(o==="~"){let l=xa(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="~")break}l=xa(l,s)}return!1}if(o===">="){let l=e;for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}throw new Error(`Unsupported combinator "${o}"`)})}_matchesEngine(e,n,r,s){if(e.matches)return this._callMatches(e,n,r,s);if(e.query)return this._callQuery(e,r,s).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(s=>this._callMatches(e,s,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,s){return this._cached(this._cacheCallMatches,n,[e,s.scope,s.pierceShadow,s.originalScope,...r],()=>e.matches(n,r,s,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function s(i){if(r=r.concat([...i.querySelectorAll(n)]),!!e.pierceShadow){i.shadowRoot&&s(i.shadowRoot);for(const o of i.querySelectorAll("*"))o.shadowRoot&&s(o.shadowRoot)}}return s(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Is={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(s=>r.matches(t,s,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const s of e)r=r.concat(n.query(t,s));return e.length===1?r:yy(r)}},y_={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},v_={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;return s.nodeType===9?t===s.documentElement:t===s},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const s=r.documentElement;return s?[s]:[]}return r.nodeType===1?[r]:[]}},w_={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},S_={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},x_={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return $r(t)}},__={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const s=De(e[0]).toLowerCase(),i=o=>o.normalized.toLowerCase().includes(s);return Cl(r._cacheText,t,i)==="self"}},k_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const s=De(e[0]),i=o=>!s&&!o.immediate.length?!0:o.immediate.some(l=>De(l)===s);return Cl(r._cacheText,t,i)!=="none"}},E_={matches(t,e,n,r){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const s=new RegExp(e[0],e.length===2?e[1]:void 0),i=o=>s.test(o.full);return Cl(r._cacheText,t,i)==="self"}},T_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(af(t))return!1;const s=De(e[0]).toLowerCase();return(o=>o.normalized.toLowerCase().includes(s))(Ke(r._cacheText,t))}};function xs(t){return{matches(e,n,r,s){const i=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,o=i===void 0?n:n.slice(0,n.length-1);if(n.length<1+(i===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const l=s.query(r,o),a=gy(t,e,l,i);return a===void 0?!1:(s._markScore(e,a),!0)}}}const b_={query(t,e,n){let r=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const s=Is.query(t,e.slice(0,e.length-1),n);return r--,r1){const a=new Set(l.children);l.children=[];let c=o.firstElementChild;for(;c&&l.children.lengthyo(c)))]}else{const o=or(t,e,n)||Hi(t,e,n);r=[yo(o)]}}const s=r[0],i=t.parseSelector(s);return{selector:s,selectors:r,elements:t.querySelectorAll(i,n.root??e.ownerDocument)}}finally{Dc.clear(),Fc.clear(),lf(),t._evaluator.end()}}function mh(t){return t.filter(e=>e[0].selector[0]!=="/")}function or(t,e,n){if(n.root&&!Nl(n.root,e))throw new Error("Target element must belong to the root's subtree");if(e===n.root)return[{engine:"css",selector:":scope",score:1}];if(e.ownerDocument.documentElement===e)return[{engine:"css",selector:"html",score:1}];const r=(i,o)=>{const l=i===e;let a=o?B_(t,i,i===e):[];i!==e&&(a=mh(a));const c=z_(t,i,n).filter(d=>!n.omitInternalEngines||!d.engine.startsWith("internal:")).map(d=>[d]);let u=gh(t,n.root??e.ownerDocument,i,[...a,...c],l);a=mh(a);const f=d=>{const h=o&&!d.length,v=[...d,...c].filter(w=>u?ln(w)=ln(u))continue;if(m=gh(t,w,i,v,l),!m)return;const g=[...y,...m];(!u||ln(g){const l=o?Dc:Fc;let a=l.get(i);return a===void 0&&(a=r(i,o),l.set(i,a)),a};return r(e,!n.noText)}function z_(t,e,n){const r=[];{for(const o of["data-testid","data-test-id","data-test"])o!==n.testIdAttributeName&&e.getAttribute(o)&&r.push({engine:"css",selector:`[${o}=${vs(e.getAttribute(o))}]`,score:N_});if(!n.noCSSId){const o=e.getAttribute("id");o&&!U_(o)&&r.push({engine:"css",selector:Ny(o),score:R_})}r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:Ty})}if(e.nodeName==="IFRAME"){for(const o of["name","title"])e.getAttribute(o)&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[${o}=${vs(e.getAttribute(o))}]`,score:C_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${vs(e.getAttribute(n.testIdAttributeName))}]`,score:dh}),zc([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${Oe(e.getAttribute(n.testIdAttributeName),!0)}]`,score:dh}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const o=e;if(o.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Oe(o.placeholder,!0)}]`,score:L_});for(const l of Er(o.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Oe(l.text,!1)}]`,score:Sy-l.scoreBonus})}}const s=ly(t._evaluator._cacheText,e);for(const o of s){const l=o.normalized;r.push({engine:"internal:label",selector:Ve(l,!0),score:I_});for(const a of Er(l))r.push({engine:"internal:label",selector:Ve(a.text,!1),score:xy-a.scoreBonus})}const i=ye(e);return i&&!["none","presentation"].includes(i)&&r.push({engine:"internal:role",selector:i,score:Ey}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[name=${vs(e.getAttribute("name"))}]`,score:_a}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[type=${vs(e.getAttribute("type"))}]`,score:_a}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:_a+1}),zc([r]),r}function B_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],s=e.getAttribute("title");if(s){r.push([{engine:"internal:attr",selector:`[title=${Oe(s,!0)}]`,score:$_}]);for(const c of Er(s))r.push([{engine:"internal:attr",selector:`[title=${Oe(c.text,!1)}]`,score:ky-c.scoreBonus}])}const i=e.getAttribute("alt");if(i&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Oe(i,!0)}]`,score:M_}]);for(const c of Er(i))r.push([{engine:"internal:attr",selector:`[alt=${Oe(c.text,!1)}]`,score:_y-c.scoreBonus}])}const o=Ke(t._evaluator._cacheText,e).normalized,l=o?Er(o):[];if(o){if(n){o.length<=80&&r.push([{engine:"internal:text",selector:Ve(o,!0),score:O_}]);for(const u of l)r.push([{engine:"internal:text",selector:Ve(u.text,!1),score:go-u.scoreBonus}])}const c={engine:"css",selector:ut(e.nodeName.toLowerCase()),score:Ty};for(const u of l)r.push([c,{engine:"internal:has-text",selector:Ve(u.text,!1),score:go-u.scoreBonus}]);if(o.length<=80){const u=new RegExp("^"+Go(o)+"$");r.push([c,{engine:"internal:has-text",selector:Ve(u,!1),score:hh}])}}const a=ye(e);if(a&&!["none","presentation"].includes(a)){const c=ui(e,!1);if(c){const u={engine:"internal:role",selector:`${a}[name=${Oe(c,!0)}]`,score:j_};r.push([u]);for(const f of Er(c))r.push([{engine:"internal:role",selector:`${a}[name=${Oe(f.text,!1)}]`,score:wy-f.scoreBonus}])}else{const u={engine:"internal:role",selector:`${a}`,score:Ey};for(const f of l)r.push([u,{engine:"internal:has-text",selector:Ve(f.text,!1),score:go-f.scoreBonus}]);if(o.length<=80){const f=new RegExp("^"+Go(o)+"$");r.push([u,{engine:"internal:has-text",selector:Ve(f,!1),score:hh}])}}}return zc(r),r}function Ny(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id="${ut(t)}"]`}function ka(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Hi(t,e,n){const r=n.root??e.ownerDocument,s=[];function i(l){const a=s.slice();l&&a.unshift(l);const c=a.join(" > "),u=t.parseSelector(c);return t.querySelector(u,r,!1)===e?c:void 0}function o(l){const a={engine:"css",selector:l,score:D_},c=t.parseSelector(l),u=t.querySelectorAll(c,r);if(u.length===1)return[a];const f={engine:"nth",selector:String(u.indexOf(e)),score:by};return[a,f]}for(let l=e;l&&l!==r;l=$e(l)){const a=l.nodeName.toLowerCase();let c="";if(l.id&&!n.noCSSId){const d=Ny(l.id),h=i(d);if(h)return o(h);c=d}const u=l.parentNode,f=[...l.classList];for(let d=0;dw.nodeName.toLowerCase()===a).indexOf(l)===0?ut(a):`${ut(a)}:nth-child(${1+d.indexOf(l)})`,m=i(v);if(m)return o(m);c||(c=v)}else c||(c=ut(a));s.unshift(c)}return o(i())}function zc(t){for(const e of t)for(const n of e)n.score>A_&&n.score>"),n=r,r==="css"?e.push(s):e.push(`${r}=${s}`);return e.join(" ")}function ln(t){let e=0;for(let n=0;n({tokens:l,score:ln(l)}));i.sort((l,a)=>l.score-a.score);let o=null;for(const{tokens:l}of i){const a=t.parseSelector(yo(l)),c=t.querySelectorAll(a,e);if(c[0]===n&&c.length===1)return l;const u=c.indexOf(n);if(!s||o||u===-1||c.length>5)continue;const f={engine:"nth",selector:String(u),score:by};o=[...l,f]}return o}function U_(t){let e,n=0;for(let r=0;r="a"&&s<="z"?i="lower":s>="A"&&s<="Z"?i="upper":s>="0"&&s<="9"?i="digit":i="other",i==="lower"&&e==="upper"){e=i;continue}e&&e!==i&&++n,e=i}}return n>=t.length/4}function Vi(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function Er(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(r).trimStart(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(0,t.length-r).trimEnd(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:Vi(t,80),scoreBonus:0}),e.push({text:Vi(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}const yh=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class Ea{constructor(e){this._highlightEntries=[],this._highlightOptions={},this._language="javascript",this._injectedScript=e;const n=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483646",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,s=>{s.stopPropagation(),s.stopImmediatePropagation(),s.type==="click"&&s.button===0&&this._highlightOptions.tooltipListItemSelected&&this._highlightOptions.tooltipListItemSelected(void 0)});if(this._actionPointElement=n.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(yh),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=yh,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&!this._injectedScript.document.documentElement.contains(this._glassPaneElement)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this.updateHighlight(this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),{tooltipText:Sn(this._language,Wt(e))}),this._rafRequest=this._injectedScript.builtinRequestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._highlightEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._highlightEntries=[],this._highlightOptions={},this._glassPaneElement.style.pointerEvents="none"}updateHighlight(e,n){this._innerUpdateHighlight(e,n)}maskElements(e,n){this._innerUpdateHighlight(e,{color:n})}_innerUpdateHighlight(e,n){let r=n.color;if(r||(r=e.length>1?"#f6b26b7f":"#6fa8dc7f"),!this._highlightIsUpToDate(e,n)){this.clearHighlight(),this._highlightOptions=n,this._glassPaneElement.style.pointerEvents=n.tooltipListItemSelected?"initial":"none";for(let s=0;s1?` [${s+1} of ${e.length}]`:"";l=[n.tooltipText+a]}for(let a=0;a{var u;return(u=n.tooltipListItemSelected)==null?void 0:u.call(n,a)}))}if(n.tooltipFooter){const a=this._injectedScript.document.createElement("x-pw-tooltip-footer");a.textContent=n.tooltipFooter,o.appendChild(a)}}this._highlightEntries.push({targetElement:e[s],tooltipElement:o,highlightElement:i})}for(const s of this._highlightEntries){if(s.box=s.targetElement.getBoundingClientRect(),!s.tooltipElement)continue;const{anchorLeft:i,anchorTop:o}=this.tooltipPosition(s.box,s.tooltipElement);s.tooltipTop=o,s.tooltipLeft=i}for(const s of this._highlightEntries){s.tooltipElement&&(s.tooltipElement.style.top=s.tooltipTop+"px",s.tooltipElement.style.left=s.tooltipLeft+"px");const i=s.box;s.highlightElement.style.backgroundColor=r,s.highlightElement.style.left=i.x+"px",s.highlightElement.style.top=i.y+"px",s.highlightElement.style.width=i.width+"px",s.highlightElement.style.height=i.height+"px",s.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:i.x,y:i.y,width:i.width,height:i.height}))}}}firstBox(){var e;return(e=this._highlightEntries[0])==null?void 0:e.box}tooltipPosition(e,n){const r=n.offsetWidth,s=n.offsetHeight,i=this._glassPaneElement.offsetWidth,o=this._glassPaneElement.offsetHeight;let l=e.left;l+r>i-5&&(l=i-r-5);let a=e.bottom+5;return a+s>o-5&&(e.top>s+5?a=e.top-s-5:a=o-5-s),{anchorLeft:l,anchorTop:a}}_highlightIsUpToDate(e,n){var r,s;if(n.tooltipText!==this._highlightOptions.tooltipText||n.tooltipListItemSelected!==this._highlightOptions.tooltipListItemSelected||n.tooltipFooter!==this._highlightOptions.tooltipFooter||((r=n.tooltipList)==null?void 0:r.length)!==((s=this._highlightOptions.tooltipList)==null?void 0:s.length))return!1;if(n.tooltipList&&this._highlightOptions.tooltipList){for(let i=0;i{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case` +`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Cy(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}function tl(t){const e=new Set,n={root:{role:"fragment",name:"",children:[],element:t},elements:new Map,ids:new Map},r=o=>{const l=n.elements.size+1;n.elements.set(l,o),n.ids.set(o,l)};r(t);const s=(o,l)=>{if(e.has(l))return;if(e.add(l),l.nodeType===Node.TEXT_NODE&&l.nodeValue){l.nodeValue&&o.children.push(l.nodeValue||"");return}if(l.nodeType!==Node.ELEMENT_NODE)return;const a=l;if(ct(a))return;const c=[];if(a.hasAttribute("aria-owns")){const f=a.getAttribute("aria-owns").split(/\s+/);for(const d of f){const h=t.ownerDocument.getElementById(d);h&&c.push(h)}}r(a);const u=V_(a);u&&o.children.push(u),i(u||o,a,c)};function i(o,l,a=[]){var d;const u=(((d=Zn(l))==null?void 0:d.display)||"inline")!=="inline"||l.nodeName==="BR"?" ":"";u&&o.children.push(u),o.children.push(Zo(l,"::before"));const f=l.nodeName==="SLOT"?l.assignedNodes():[];if(f.length)for(const h of f)s(o,h);else{for(let h=l.firstChild;h;h=h.nextSibling)h.assignedSlot||s(o,h);if(l.shadowRoot)for(let h=l.shadowRoot.firstChild;h;h=h.nextSibling)s(o,h)}for(const h of a)s(o,h);o.children.push(Zo(l,"::after")),u&&o.children.push(u),o.children.length===1&&o.name===o.children[0]&&(o.children=[])}of();try{s(n.root,t)}finally{lf()}return q_(n.root),n}function V_(t){const e=ye(t);if(!e||e==="presentation"||e==="none")return null;const n=De(ui(t,!1)||""),r={role:e,name:n,children:[],element:t};return Qu.includes(e)&&(r.checked=Gg(t)),ey.includes(e)&&(r.disabled=el(t)),Ju.includes(e)&&(r.expanded=Yg(t)),Yu.includes(e)&&(r.level=Zg(t)),Gu.includes(e)&&(r.pressed=Jg(t)),Ku.includes(e)&&(r.selected=Xg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&(r.children=[t.value]),r}function q_(t){const e=(r,s)=>{if(!r.length)return;const i=De(r.join(""));i&&s.push(i),r.length=0},n=r=>{const s=[],i=[];for(const o of r.children||[])typeof o=="string"?i.push(o):(e(i,s),n(o),s.push(o));e(i,s),r.children=s.length?s:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function Ay(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function W_(t,e){return Ay(t,e.text)}function K_(t,e){return Ay(t,e.name)}function Q_(t,e){const n=tl(t).root;return{matches:Iy(n,e,!1),received:{raw:Vs(n,{mode:"raw"}),regex:Vs(n,{mode:"regex"})}}}function X_(t,e){const n=tl(t).root;return Iy(n,e,!0).map(s=>s.element)}function Ly(t,e,n){return typeof t=="string"&&e.kind==="text"?W_(t,e):t!==null&&typeof t=="object"&&e.kind==="role"?!(e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!K_(t.name,e)||!G_(t.children||[],e.children||[])):!1}function G_(t,e,n){if(e.length>t.length)return!1;const r=t.slice(),s=e.slice();for(const i of s){let o=r.shift();for(;o&&!Ly(o,i);)o=r.shift();if(!o)return!1}return!0}function Iy(t,e,n){const r=[],s=(i,o)=>{if(Ly(i,e)){const l=typeof i=="string"?o:i;return l&&r.push(l),!n}if(typeof i=="string")return!1;for(const l of i.children||[])if(s(l,i))return!0;return!1};return s(t,null),r}function Vs(t,e){const n=[],r=(e==null?void 0:e.mode)==="regex"?Y_:()=>!0,s=(e==null?void 0:e.mode)==="regex"?J_:o=>o,i=(o,l,a)=>{if(typeof o=="string"){if(l&&!r(l,o))return;const f=vh(s(o));f&&n.push(a+"- text: "+f);return}let c=o.role;if(o.name&&o.name.length<=900){const f=s(o.name);if(f){const d=f.startsWith("/")&&f.endsWith("/")?f:JSON.stringify(f);c+=" "+d}}if(o.checked==="mixed"&&(c+=" [checked=mixed]"),o.checked===!0&&(c+=" [checked]"),o.disabled&&(c+=" [disabled]"),o.expanded&&(c+=" [expanded]"),o.level&&(c+=` [level=${o.level}]`),o.pressed==="mixed"&&(c+=" [pressed=mixed]"),o.pressed===!0&&(c+=" [pressed]"),o.selected===!0&&(c+=" [selected]"),e!=null&&e.ids){const f=e==null?void 0:e.ids.get(o.element);f&&(c+=` [id=${f}]`)}const u=a+"- "+H_(c);if(!o.children.length)n.push(u);else if(o.children.length===1&&typeof o.children[0]=="string"){const f=r(o,o.children[0])?s(o.children[0]):null;f?n.push(u+": "+vh(f)):n.push(u)}else{n.push(u+":");for(const f of o.children||[])i(f,o,a+" ")}};if(t.role==="fragment")for(const o of t.children||[])i(o,t,"");else i(t,null,"");return n.join(` +`)}function J_(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const s=new RegExp(e.map(i=>"("+i.regex.source+")").join("|"),"g");return t.replace(s,(i,...o)=>{const l=o[o.length-2],a=o.slice(0,-2);n+=Go(t.slice(r,l));for(let c=0;ce.length)return!1;const n=e.length<=200&&t.name.length<=200?X1(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function cf(t,e,n={}){var d;const r=new t.LineCounter,s={keepSourceTokens:!0,lineCounter:r,...n},i=t.parseDocument(e,s),o=[],l=h=>[r.linePos(h[0]),r.linePos(h[1])],a=h=>{o.push({message:h.message,range:[r.linePos(h.pos[0]),r.linePos(h.pos[1])]})},c=(h,v)=>{for(const m of v.items){if(m instanceof t.Scalar&&typeof m.value=="string"){const g=nl.parse(m,s,o);g&&(h.children=h.children||[],h.children.push(g));continue}if(m instanceof t.YAMLMap){u(h,m);continue}o.push({message:"Sequence items should be strings or maps",range:l(m.range||v.range)})}},u=(h,v)=>{for(const m of v.items){if(h.children=h.children||[],!(m.key instanceof t.Scalar&&typeof m.key.value=="string")){o.push({message:"Only string keys are supported",range:l(m.key.range||v.range)});continue}const y=m.key,g=m.value;if(y.value==="text"){if(!(g instanceof t.Scalar&&typeof g.value=="string")){o.push({message:"Text value should be a string",range:l(m.value.range||v.range)});continue}h.children.push({kind:"text",text:wh(g.value)});continue}const S=nl.parse(y,s,o);if(!S)continue;if(g instanceof t.Scalar){const T=typeof g.value;if(T!=="string"&&T!=="number"&&T!=="boolean"){o.push({message:"Node value should be a string or a sequence",range:l(m.value.range||v.range)});continue}h.children.push({...S,children:[{kind:"text",text:wh(String(g.value))}]});continue}if(g instanceof t.YAMLSeq){h.children.push(S),c(S,g);continue}o.push({message:"Map values should be strings or sequences",range:l(m.value.range||v.range)})}},f={kind:"role",role:"fragment"};return i.errors.forEach(a),o.length?{errors:o,fragment:f}:(i.contents instanceof t.YAMLSeq||o.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:i.contents?l(i.contents.range):[{line:0,col:0},{line:0,col:0}]}),o.length?{errors:o,fragment:f}:(c(f,i.contents),o.length?{errors:o,fragment:Z_}:((d=f.children)==null?void 0:d.length)===1?{fragment:f.children[0],errors:o}:{fragment:f,errors:o}))}const Z_={kind:"role",role:"fragment"};function jy(t){return t.replace(/[\r\n\s\t]+/g," ").trim()}function wh(t){return t.startsWith("/")&&t.endsWith("/")&&t.length>1?{pattern:t.slice(1,-1)}:jy(t)}class nl{static parse(e,n,r){try{return new nl(e.value)._parse()}catch(s){if(s instanceof Sh){const i=n.prettyErrors===!1?s.message:s.message+`: + +`+e.value+` +`+" ".repeat(s.pos)+`^ +`;return r.push({message:i,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+s.pos)]}),null}throw s}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Sh(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const s=this._next();if(n)e+=s,n=!1;else if(s==="\\")n=!0,e+=s;else{if(s==="/"&&!r)return{pattern:e};s==="["?(r=!0,e+=s):s==="]"&&r?(e+=s,r=!1):e+=s}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),jy(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let s="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)s+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,s||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,s){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',s),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',s),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',s),e.expanded=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',s),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',s),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',s),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,s)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Sh extends Error{constructor(e,n){super(e),this.pos=n}}class My{constructor(e,n,r,s,i,o,l){this.onGlobalListenersRemoved=new Set,this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Sn,cacheNormalizedWhitespaces:K1,elementText:Ke,getAriaRole:ye,getElementAccessibleDescription:ch,getElementAccessibleName:ui,isElementVisible:$r,isInsideScope:Nl,normalizeWhiteSpace:De,parseAriaSnapshot:cf},this.window=e,this.document=e.document,this.isUnderTest=n,this._sdkLanguage=r,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=s,this._evaluator=new g_(new Map),this._engines=new Map,this._engines.set("xpath",sh),this._engines.set("xpath:light",sh),this._engines.set("_react",n_),this._engines.set("_vue",l_),this._engines.set("role",fh(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",fh(!0));for(const{name:a,engine:c}of l)this._engines.set(a,c);this._stableRafCount=i,this._browserName=o,Ox(o),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),n&&(this.window.__injectedScript=this)}builtinSetTimeout(e,n){var r;return(r=this.window.__pwClock)!=null&&r.builtin?this.window.__pwClock.builtin.setTimeout(e,n):this.window.setTimeout(e,n)}builtinClearTimeout(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.clearTimeout(e):this.window.clearTimeout(e)}builtinRequestAnimationFrame(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.requestAnimationFrame(e):this.window.requestAnimationFrame(e)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const n=Tl(e);return pS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return ph(this,e,n)}generateSelectorSimple(e,n){return ph(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const s=this.querySelectorAll(e,n);if(r&&s.length>1)throw this.strictModeViolationError(e,s);return s[0]}_queryNth(e,n){const r=[...e];let s=+n.body;return s===-1&&(s=r.length-1),new Set(r.slice(s,s+1))}_queryLayoutSelector(e,n,r){const s=n.name,i=n.body,o=[],l=this.querySelectorAll(i.parsed,r);for(const a of e){const c=gy(s,a,l,i.distance);c!==void 0&&o.push({element:a,score:c})}return o.sort((a,c)=>a.score-c.score),new Set(o.map(a=>a.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const r=tl(e);return Vs(r.root,n)}ariaSnapshotAsObject(e){return tl(e)}ariaSnapshotElement(e,n){return e.elements.get(n)||null}renderAriaTree(e,n){return Vs(e,n)}renderAriaSnapshotWithIds(e){return Vs(e.root,{ids:e.ids})}getAllByAria(e,n){return X_(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(s=>s.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capturer.has(o)))}else if(s.name==="internal:or"){const i=this.querySelectorAll(s.body.parsed,n);r=new Set(yy(new Set([...r,...i])))}else if(m_.includes(s.name))r=this._queryLayoutSelector(r,s,n);else{const i=new Set;for(const o of r){const l=this._queryEngineAll(s,o);for(const a of l)i.add(a)}r=i}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const s of r)if(!("nodeName"in s))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(s)}`);return r}_createAttributeEngine(e,n){const r=s=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(s)}]`,functions:[]},combinator:""}]}];return{queryAll:(s,i)=>this._evaluator.query({scope:s,pierceShadow:n},r(i))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(s,i)=>{const{matcher:o,kind:l}=Wi(i,n),a=[];let c=null;const u=d=>{if(l==="lax"&&c&&c.contains(d))return!1;const h=Cl(this._evaluator._cacheText,d,o);h==="none"&&(c=d),(h==="self"||h==="selfAndChildren"&&l==="strict"&&!n)&&a.push(d)};s.nodeType===Node.ELEMENT_NODE&&u(s);const f=this._evaluator._queryCSS({scope:s,pierceShadow:e},"*");for(const d of f)u(d);return a}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=Wi(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(i=>ly(this._evaluator._cacheText,i).some(o=>r(o)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const s=Un(r,!0);if(s.name||s.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:i,value:o,caseSensitive:l}=s.attributes[0],a=l?null:o.toLowerCase();let c;return o instanceof RegExp?c=f=>!!f.match(o):l?c=f=>f===o:c=f=>f.toLowerCase().includes(a),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${i}]`).filter(f=>c(f.getAttribute(i)))}}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const s=r==="true";return $r(n)===s?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(` + (() => { + const module = {}; + ${e} + return module.exports.default(); + })()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(s=>{n(s[0].intersectionRatio),r.disconnect()});r.observe(e),this.builtinRequestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let s=e;s;s=$e(s))if(n.getComputedStyle(s).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const s=r.closest("label");s&&s.control&&(r=s.control)}return r}async checkElementStates(e,n){if(n.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of n)if(r!=="stable"){const s=this.elementState(e,r);if(s.received==="error:notconnected")return"error:notconnected";if(!s.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,s=0,i=0;const o=()=>{const f=this.retarget(e,"no-follow-label");if(!f)return"error:notconnected";const d=performance.now();if(this._stableRafCount>1&&d-i<15)return n;i=d;const h=f.getBoundingClientRect(),v={x:h.top,y:h.left,width:h.width,height:h.height};if(r){if(!(v.x===r.x&&v.y===r.y&&v.width===r.width&&v.height===r.height))return!1;if(++s>=this._stableRafCount)return!0}return r=v,n};let l,a;const c=new Promise((f,d)=>{l=f,a=d}),u=()=>{try{const f=o();f!==n?l(f):this.builtinRequestAnimationFrame(u)}catch(f){a(f)}};return this.builtinRequestAnimationFrame(u),c}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const s=$r(r);return{matches:n==="visible"?s:!s,received:s?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const s=el(r);return{matches:n==="disabled"?s:!s,received:s?"disabled":"enabled"}}if(n==="editable"){const s=el(r),i=Gx(r);if(i==="error")throw this.createStacklessError("Element is not an ,